PHP Registration Form
14 Sep 2017 07:29
When you login into a website or into your mail box, you are interacting with a form.
Forms are used to get input from the user and submit it to the web server for processing.
Learn PHP Registration Form using GET, POST Methods with Example and code.
<html> <head> <title>Registration Form</title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> </head> <body> if (isset($_POST['form_submitted'])): //this code is executed when the form is submitted <h2>Thank You echo $_POST['firstname']; </h2> <p>You have been registered as echo $_POST['firstname'] . ' ' . $_POST['lastname']; </p> <p>Go <a href="/registration_form.php" >back</a> to the form</p> else: <h2>Registration Form</h2> <form action="registration_form.php" method="POST"> First name: <input type="text" name="firstname"><br> Last name: <input type="text" name="lastname"> <br> <input type="hidden" name="form_submitted" value="1"/> <input type="submit" value="Submit"> </form> endif; ? > </body> </html>
View the Demo: https://www.guru99.com/php-forms-handling.html
Original URL: https://www.guru99.com/php-tutorials.html
License Info:
Thanks for posting, looking forward to more!
CEO of Icon Deposit
Take a look at me via Twitter, Dribbble, and Google +
Thanks!