Hello,
I've just started learning PHP from the book Beginning php5 and I'm stuck. I keep getting this error. I've went though the book and the coding looks exactly like whats on page 146. Spent two hours trying to figure out where I went wrong.
Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in C:\xampp\htdocs\formprocess3.php on line 5
<?php
if ($_POST['type'] == "Movie" && $_POST['MovieType'] == "") {
header("Location:form3.php);
}
$title = $_POST['Submit'] . " " .
$_POST['type'] . " : " .
$_POST['Name'];
$_POST['Submit'] . " " .
$_POST['type'] . " : " .
$_POST['Name'];
?>
<html>
<head>
<title><?php echo $title; ?></title>
</head>
<body>
<?php
if ($_POST['Debug'] == "on") {
?>
<pre>
<?php
print_r($_POST);
?>
</pre>
<?php
}
$name = $_POST['Name'];
$name[0] = strtoupper{$name[0]);
if ($_POST['type'] == "Movie") {
$foo = $_POST['MovieType'] . " " . $_POST['type'];
} else {
$foo = $_POST['type'];
}
?>
<p align="center">
You are <?php echo $_POST['Submit']; ?>ing
<?php echo $_POST['Submit'] == "Search" ? "for " : ""; ?>
a <?php echo $foo ?>
named "<?php echo $name; ?>"
</p>
</body>
</html>
I'm running PHP5, apache 2 and Mysql on windows XP. Its installed using XAMPP. Though it might be my settings.
Any help would be appreciated,
Thanks :o