DEV Community

loading...
Cover image for PHP form 30: input text textarea radio

PHP form 30: input text textarea radio

Falah Al Fitri
I am Developer
Updated on ・1 min read

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 />

Add input type radio:

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

        <br />

        <hr />

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

    </form>

And, the process:

    echo "<pre>";

    var_dump($_POST);

Source Code Next


Thank for reading :)

Discussion (0)