Hi can someone tell me if there is a typing mistake in this php file or can you tell me what i have done wrong? this is the error message my browser shows:
Parse error: parse error, unexpected $end in C:\Program Files\Apache Group\Apache2\test\moviesite.php on line 43
This is my code for moviesite.php:
<?
session_start();
//check to see if user has logged in with a valid password
if ($_SESSION['authuser']!=1) {
echo "Sorry, but you don't have permission to view this
page, you loser!";
exit();
}
?>
<HTML>
<HEAD>
<TITLE>My Movie Site - <? echo $_REQUEST['favmovie'] ?></TITLE>
</HEAD>
<BODY>
<? include "header.php" ?>
<?
$favmovies = array("Life of Brian","Stripes","Office Space","The Holy Grail",
"Matrix", "Terminator 2", "Star Wars", "Close Encounters of the Third Kind",
"Sixteen Candles", "Caddyshack");
if (ISSET($_REQUEST['favmovie'])) {
echo "Welcome to our site, ";
echo $_SESSION['username'];
echo "! <br>";
echo "My favorite movie is ";
echo $_REQUEST['favmovie'];
echo "<br>";
$movierate=5;
echo "My movie rating for this movie is: ";
echo $movierate;
}
else {
echo "My top movies are: <br>";
if (ISSET($_REQUEST['sorted'])) {
sort ($favmovie);
}
foreach ($favmovies as $currentvalue) {
echo $currentvalue;
echo "<br>\n";
}
?>
</BODY>
</HTML>
http://www.uggle.com
http://www.leap2.co.uk
[email protected]
[email protected]