View Single Post
Old July 27th, 2005, 05:25 AM
psychot psychot is offline
Registered User
Join Date: Jul 2005
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Chapter 2 {curly bracket} parse error of DEATH

Ok, I am a beginner in PHP (Hence buying a book called Beginning PHP5.....).

I've worked my way into chapter 2, with the moviesite.php file working upto the point where I'm on page 47 and passing the visitors username. The code I've typed into Moviesite is


//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.....";
<TITLE>My Movie Site - <?php echo $_REQUEST['favmovie']; ?></TITLE>
    echo "Welcome to our site, ";
    echo $_SESSION['username'];
    echo "My favorite movie is ";
    echo $_REQUEST['favmovie'];
    echo "<br>";
    $movierate = 5;
    echo "My movie rating for this movie is: ";
    echo $movierate;

which I've checked and rechecked again and again. When trying to access the moviesite.php in my browser I generate this error message in my log file:

[Wed Jul 27 12:22:52 2005] [error] PHP Parse error: parse error, unexpected '{' in /Library/WebServer/Documents/moviesite.php on line 5

I'm at a bit of a dead end with this one, I've done a lot looking in the php.ini file, my path is good, but the curly bracket parse error of DEATH is killing me..... Help oh wise ones out there...... pleeeeaaassseee......