adamriley Posted May 8, 2010 Share Posted May 8, 2010 (im new to php) error log --------------------------------------------------------------------------------------------------------------- Parse error: syntax error, unexpected '{' in C:\xampp\htdocs\Game\Check.php on line 9 --------------------------------------------------------------------------------------------------------------- <?php $Spot_id = $_GET["Spot"]; // get name of spot from url include($_SERVER["DOCUMENT_ROOT"]."/Counter/Visitors.php"); // counter file $file_for_game = $_SERVER["DOCUMENT_ROOT"]."/Game/Places/$Spot_id.txt"; if(!file_exists("$file_for_game")) { die("Error: Please contact webmaster " . $file_for_game . " Is not found!"); } else(file_exists("$file_for_game")) { = $stop == 'true'; } // first of all there would be 1 more php elseif due to the first if // being for the error due to the spot already being taken by someone else if ($stop == 'true'){ /* CLOSE PHP HERE BECAUSE WE WANT TO OUTPUT HTML */ ?> <html> <body> <h2>Taken</h2> <?php }elseif ($visitors_online == '2') { /* OPEN PHP FOR THE if THEN CLOSE IT FOR HTML AGAIN */ ?> <html> <body> <h2>This spot is free why not snap it up quickly before some one else does</h2> <?php echo $Spot_id ?> <?php } else { // OPEN PHP AGAIN FOR THE CLOSING BRACE?> <h2>This spot is free why not snap it up quickly before some one else does</h2> <?php } ?> if you need the rest of the files ask (3 files) Quote Link to comment Share on other sites More sharing options...
JAY6390 Posted May 8, 2010 Share Posted May 8, 2010 if(file_exists("$file_for_game")) { $stop = 'true'; } is how you can fix that line I have no idea wtf you were trying to do with the = $stop == but that is not going to work Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.