• December 7, 2021
    <html>
        <body>
            <!--name.php to be called on form submission-->
            <form method = 'post'>
                <h4>SELECT SUBJECTS</h4>
                 
                <select name = 'subject[]' multiple size = 6> 
                    <option value = 'english'>ENGLISH</option>
                    <option value = 'maths'>MATHS</option>
                    <option value = 'computer'>COMPUTER</option>
                    <option value = 'physics'>PHYSICS</option>
                    <option value = 'chemistry'>CHEMISTRY</option>
                    <option value = 'hindi'>HINDI</option>
                </select>
                <input type = 'submit' name = 'submit' value = Submit>
            </form>
        </body>
    </html>
    <?php
         
        // Check if form is submitted successfully
        if(isset($_POST["submit"]))
        {
            // Check if any option is selected
            if(isset($_POST["subject"]))
            {
                // Retrieving each selected option
                foreach ($_POST['subject'] as $subject)
                    print "You selected $subject<br/>";
            }
        else
            echo "Select an option first !!";
        }
    ?>
    --
    <?php $name = "GeeksforGeeks.org";?>
    <?= "<h1>{$name} welcomes</h1>" ?>
    ---
    <?php
    // To Get the last modification time.
    $last_modification="Last modified: " . date ("F d Y H:i:s.", getlastmod());
    // To Show the last modification time.
    echo $last_modification;
    ?>
    ----
    


เวอไนน์ไอคอร์ส

ประหยัดเวลากว่า 100 เท่า!






เวอไนน์เว็บไซต์⚡️
สร้างเว็บไซต์ ดูแลเว็บไซต์

Categories


Uncategorized