Hi this code is online in a tutorial and supposed to work according to the tutorial however it does not work for me. Can anyone see what the problem is? I’ve spent so much time trying to find the problem and cannot. Any help would be greatly appreciated. Thank you.
[php]<?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’])) { // if page is not submitted to itself echo the form
?>
Last Name:
Gender:
Male:
Female:
Please choose type of residence:
Steak:
Pizza:
Chicken:
Enter your favorite quote!
Select a Level of Education:
Jr.High HighSchool College
Select your favorite time of day:
Morning Day Night
<? } else { echo "Hello, ".$Fname." ".$Lname.".
"; echo "You are ".$gender.", and you like "; foreach ($food as $f) { echo $f."
"; } echo "".$quote."
"; echo "You're favorite time is ".$TofD.", and you passed ".$education."!
"; } ?>[/php]