PHP form 30: input text textarea radio

antelove19

Falah Al Fitri

Posted on December 14, 2019

PHP form 30: input text textarea radio

Happy Coding



Previous

We will create form with input type radio:

    <form method="post" action="process.php" >

        Firstname: <input type="text" name="firstname" />
        <br />

        Lastname: <input type="text" name="lastname" />
        <br />

        Description: <textarea name="description" rows="10" cols="50"></textarea>
        <br />
Enter fullscreen mode Exit fullscreen mode

Add input type radio:

        Gender:
        <input type="radio" name="gender" value="male" checked /> Male
        <input type="radio" name="gender" value="female" /> Female
Enter fullscreen mode Exit fullscreen mode

        <br />

        <hr />

        <input type="submit" name="submit" value="Submit" />

    </form>
Enter fullscreen mode Exit fullscreen mode

And, the process:

    echo "<pre>";

    var_dump($_POST);
Enter fullscreen mode Exit fullscreen mode

Source Code Next


Thank for reading :)

💖 💪 🙅 🚩
antelove19
Falah Al Fitri

Posted on December 14, 2019

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related