<?php
$Fname = $_POST['Fname'];
$Lname = $_POST['Lname'];
$gender = $_POST['gender'];
$food = $_POST['food'];
$quote = $_POST['quote'];
$education = $_POST['education'];
$TofD = $_POST['TofD'];
if(isset($_POST['submit']))
{
$name = $_POST['name'];
echo 'User Has submitted the form and entered this name : ';
echo $name;
echo 'You can use the following form again to enter a new name.';
}
else
{
echo 'Hello, ';
echo $Fname;
echo $Lname;
echo 'You are ';
echo $gender;
echo 'and you like ';
foreach ($food as $f) {
echo $f;
}
echo $quote;
echo 'Youre favorite time is ';
echo $TofD;
echo 'and you passed ';
echo $education;
}
?>
Warning: Undefined array key "Fname" in /in/H7EmU on line 2
Warning: Undefined array key "Lname" in /in/H7EmU on line 3
Warning: Undefined array key "gender" in /in/H7EmU on line 4
Warning: Undefined array key "food" in /in/H7EmU on line 5
Warning: Undefined array key "quote" in /in/H7EmU on line 6
Warning: Undefined array key "education" in /in/H7EmU on line 7
Warning: Undefined array key "TofD" in /in/H7EmU on line 8
Hello, You are and you like
Warning: foreach() argument must be of type array|object, null given in /in/H7EmU on line 24
Youre favorite time is and you passed
Notice: Undefined index: Fname in /in/H7EmU on line 2
Notice: Undefined index: Lname in /in/H7EmU on line 3
Notice: Undefined index: gender in /in/H7EmU on line 4
Notice: Undefined index: food in /in/H7EmU on line 5
Notice: Undefined index: quote in /in/H7EmU on line 6
Notice: Undefined index: education in /in/H7EmU on line 7
Notice: Undefined index: TofD in /in/H7EmU on line 8
Hello, You are and you like
Warning: Invalid argument supplied for foreach() in /in/H7EmU on line 24
Youre favorite time is and you passed
Output for 7.3.32 - 7.3.33, 7.4.26
Hello, You are and you like
Warning: Invalid argument supplied for foreach() in /in/H7EmU on line 24
Youre favorite time is and you passed
Notice: Undefined index: Fname in /in/H7EmU on line 2
Notice: Undefined index: Lname in /in/H7EmU on line 3
Notice: Undefined index: gender in /in/H7EmU on line 4
Notice: Undefined index: food in /in/H7EmU on line 5
Notice: Undefined index: quote in /in/H7EmU on line 6
Notice: Undefined index: education in /in/H7EmU on line 7
Notice: Undefined index: TofD in /in/H7EmU on line 8
Hello, You are and you like
Warning: Invalid argument supplied for foreach() in /in/H7EmU on line 24
Youre favorite time is and you passed
Output for 4.3.11
Notice: Undefined index: Fname in /in/H7EmU on line 2
Notice: Undefined index: Lname in /in/H7EmU on line 3
Notice: Undefined index: gender in /in/H7EmU on line 4
Notice: Undefined index: food in /in/H7EmU on line 5
Notice: Undefined index: quote in /in/H7EmU on line 6
Notice: Undefined index: education in /in/H7EmU on line 7
Notice: Undefined index: TofD in /in/H7EmU on line 8
Hello, You are and you like Youre favorite time is and you passed