I’m trying to understand why this PHP code does not work with my PHP installation. MY php doesn’t like the break in php code immediately following the open parenthesis {. All that shows up is a blank page when displaying the php page.
This is just a php form example from:
http://www.tizag.com/phpT/examples/formfinale.php
Thanks.
[code]<?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’])) { // PHP DOES NOT LIKE THIS BREAK IN CODE
?>
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
<? // Conditional statement continues here } 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."!
"; } ?> [/code]