Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

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>
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #php #load #select #page #url
ADD COMMENT
Topic
Name
5+6 =