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