Search
 
SCRIPT & CODE EXAMPLE
 

PHP

php load select page from url

<?php
    if(isset($_POST['type'])) {
        switch($_POST['type']) {
            case 1:
                header("Location: ssgt.php");
                break;
            case 2:
                header("Location: tsgt.php");
                break;
            case 3:
                header("Location: msgt.php");
                break;
        }
    }
?>
<!doctype html>
<html>
    <head>
        <meta charset="utf-8">
        <title>MCQ Questions</title>
    </head>
    <body>
        <form method="post" enctype="multipart/form-data">
            Select rank :
            <select name="type" id="type" onchange="this.form.submit()">
                <option value="">Select rank...</option>
                <option value="1">SSgt</option>
                <option value="2">TSgt</option>
                <option value="3">MSgt</option>
            </select>
        </form>
    </body>
</html>
Comment

php load select page from url

<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>MCQ Questions</title>

</head>
<body>


<form method="post" action="mcq.php" enctype="multipart/form-data">
    <?php
    if(isset($_POST['type']))
    {

        if(strcmp($_POST['type'],"1") == 0)
        {
            header("Location: ssgt.php");
        }
        elseif(strcmp($_POST['type'],"2" == 0))
        {
            header("Location: tsgt.php");
        }
        elseif(strcmp($_POST['type'],"3" == 0))
        {
            header("Location: msgt.php");
        }
    }

    ?>

    <h2>Lets add a question, Select a rank for which you want to add a question.</h2>
<br><br>
Select rank : 

<select name="type" id="type"  onchange="this.form.submit()">


    <option value="1">SSgt</option>
<option value="2">TSgt</option> 
<option value="3">MSgt</option> 
</select>

</form>
</body>
</html>
Comment

PREVIOUS NEXT
Code Example
Php :: laravel add model to polymorphic relationships 
Php :: laravel how to generate short link in laravel framework and relation with 3 model 
Php :: enable gutenberg for template 
Php :: php blob to string 
Php :: Composer detected issues in your platform: Your Composer dependencies require a PHP version "= 7.4.0". 
Php :: Convert Shamsi Jalali Persian Date TimeStamp 
Php :: Drupal 9 Get taxonomy term objects by vocabulary machine name vid 
Php :: Cakephp api POST request , saving data without validation 
Php :: php is_a 
Php :: source code in html to add two numbers together 
Php :: add object to http request php behamin proxy bproxy 
Php :: laravel {{}} not being rendered 
Php :: add attribute validation lang laravel 
Php :: Installation request for pokemon-tcg/pokemon-tcg-sdk-php ^1.2 - satisfiable by pokemon-tcg/pokemon-tcg-sdk-php[1.2.0] 
Php :: symfony postgresql 
Php :: use the content to store in variable in wp 
Php :: PHP force refresh image 
Php :: customize response body with filters laravel 
Php :: leaf php response json 
Php :: Inject interface and not concrete class 
Php :: count same datetimes in foreach and group them php 
Php :: popup en php 
Php :: Yii2 Dynamic Relational Query 
Php :: wp-query 
Php :: Handling Email Verification Error for APIs 
Php :: dompdf setoptions breaks images 
Php :: laravel get user aget from request 
Php :: lista 
Php :: how to export and import database in phpmyadmin 
Php :: php delete al lsession 
ADD CONTENT
Topic
Content
Source link
Name
2+4 =