DEV Community

Cover image for PHP form 50: input text textarea checkbox

PHP form 50: input text textarea checkbox

antelove19 profile image Falah Al Fitri Updated on ・1 min read

Happy Coding


We will create form with type checkbox input:

    <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 checkbox:

        Hobby: <input type="checkbox" name="hobby"

        <br />

        <hr />

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


And, the process:

    echo "<pre>";


Source Code Next

Thank for reading :)

Discussion (0)

Forem Open with the Forem app