Jump to content

what wrong ????


adamriley

Recommended Posts

(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)

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.