3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<html> <head> <title>Simple registration form in PHP</title> </head> <body> <form method="post" action="submit-form.php"> First Name:<input type="text" size="12" maxlength="12" name="Fname"><br /> Last Name:<input type="text" size="12" maxlength="36" name="Lname"><br /> Gender:<br /> Male:<input type="radio" value="Male" name="gender"><br /> Female:<input type="radio" value="Female" name="gender"><br /> Please choose type of residence:<br /> Steak:<input type="checkbox" value="Steak" name="food[]"><br /> Pizza:<input type="checkbox" value="Pizza" name="food[]"><br /> Chicken:<input type="checkbox" value="Chicken" name="food[]"><br /> <textarea rows="5" cols="20" name="quote" wrap="physical">Enter your favorite quote!</textarea><br /> Select a Level of Education:<br /> <select name="education"> <option value="Jr.High">Jr.High</option> <option value="HighSchool">HighSchool</option> <option value="College">College</option></select><br /> Select your favorite time of day:<br /> <select name="TofD" size="3"> <option value="Morning">Morning</option> <option value="Day">Day</option> <option value="Night">Night</option></select><br /> <input type="submit" value="submit" name="submit"> </form> <?php $Fname = $_POST['Fname']; $Lname = $_POST['Lname']; $gender = $_POST['gender']; $food = $_POST['food']; $quote = $_POST['quote']; $education = $_POST['education']; $TofD = $_POST['TofD']; $name = $_POST['name']; echo "User Has submitted the form and entered this name : <b> $name </b>"; echo "<br>You can use the following form again to enter a new name."; ?> </body> </html>
Output for 5.3.0 - 7.1.0
<html> <head> <title>Simple registration form in PHP</title> </head> <body> <form method="post" action="submit-form.php"> First Name:<input type="text" size="12" maxlength="12" name="Fname"><br /> Last Name:<input type="text" size="12" maxlength="36" name="Lname"><br /> Gender:<br /> Male:<input type="radio" value="Male" name="gender"><br /> Female:<input type="radio" value="Female" name="gender"><br /> Please choose type of residence:<br /> Steak:<input type="checkbox" value="Steak" name="food[]"><br /> Pizza:<input type="checkbox" value="Pizza" name="food[]"><br /> Chicken:<input type="checkbox" value="Chicken" name="food[]"><br /> <textarea rows="5" cols="20" name="quote" wrap="physical">Enter your favorite quote!</textarea><br /> Select a Level of Education:<br /> <select name="education"> <option value="Jr.High">Jr.High</option> <option value="HighSchool">HighSchool</option> <option value="College">College</option></select><br /> Select your favorite time of day:<br /> <select name="TofD" size="3"> <option value="Morning">Morning</option> <option value="Day">Day</option> <option value="Night">Night</option></select><br /> <input type="submit" value="submit" name="submit"> </form> Notice: Undefined index: Fname in /in/5nhf3 on line 30 Notice: Undefined index: Lname in /in/5nhf3 on line 31 Notice: Undefined index: gender in /in/5nhf3 on line 32 Notice: Undefined index: food in /in/5nhf3 on line 33 Notice: Undefined index: quote in /in/5nhf3 on line 34 Notice: Undefined index: education in /in/5nhf3 on line 35 Notice: Undefined index: TofD in /in/5nhf3 on line 36 Notice: Undefined index: name in /in/5nhf3 on line 38 User Has submitted the form and entered this name : <b> </b><br>You can use the following form again to enter a new name.</body> </html>
Output for 4.3.0 - 5.2.17
<html> <head> <title>Simple registration form in PHP</title> </head> <body> <form method="post" action="submit-form.php"> First Name:<input type="text" size="12" maxlength="12" name="Fname"><br /> Last Name:<input type="text" size="12" maxlength="36" name="Lname"><br /> Gender:<br /> Male:<input type="radio" value="Male" name="gender"><br /> Female:<input type="radio" value="Female" name="gender"><br /> Please choose type of residence:<br /> Steak:<input type="checkbox" value="Steak" name="food[]"><br /> Pizza:<input type="checkbox" value="Pizza" name="food[]"><br /> Chicken:<input type="checkbox" value="Chicken" name="food[]"><br /> <textarea rows="5" cols="20" name="quote" wrap="physical">Enter your favorite quote!</textarea><br /> Select a Level of Education:<br /> <select name="education"> <option value="Jr.High">Jr.High</option> <option value="HighSchool">HighSchool</option> <option value="College">College</option></select><br /> Select your favorite time of day:<br /> <select name="TofD" size="3"> <option value="Morning">Morning</option> <option value="Day">Day</option> <option value="Night">Night</option></select><br /> <input type="submit" value="submit" name="submit"> </form> Notice: Undefined index: Fname in /in/5nhf3 on line 30 Notice: Undefined index: Lname in /in/5nhf3 on line 31 Notice: Undefined index: gender in /in/5nhf3 on line 32 Notice: Undefined index: food in /in/5nhf3 on line 33 Notice: Undefined index: quote in /in/5nhf3 on line 34 Notice: Undefined index: education in /in/5nhf3 on line 35 Notice: Undefined index: TofD in /in/5nhf3 on line 36 Notice: Undefined index: name in /in/5nhf3 on line 38 User Has submitted the form and entered this name : <b> </b><br>You can use the following form again to enter a new name.</body> </html>