944,104 Members | Top Members by Rank

Ad:
  • PHP Discussion Thread
  • Unsolved
  • Views: 1588
  • PHP RSS
Aug 24th, 2007
0

Parse error: syntax error, unexpected T_STRING in c:/..........

Expand Post »
Hi all, i just dont understand why i get this error :
Parse error: syntax error, unexpected T_STRING in C:\Program Files\wamp\www\working3\admincp\pages\mainconfig.php on line 11

I have google it alot and i just find that its probably becouse ur missing a ;, But i cant find the place. I have tested almost everything but it just give me other errors, So im asking someone thats good at this to help me. Thanks alot for reading// Erik

PHP Syntax (Toggle Plain Text)
  1. <?
  2. if (ALLOW_OPEN != 1){
  3. exit("You can't open this site directly");
  4. }
  5. if ($_GET['change'] == "yes"){
  6. mssql_query("UPDATE site_config SET sitename = '".$_POST['sitename']."',enable_gmblock = '".$_POST['gmblock']."',enable_store = '".$_POST['storage']."',allow_register = '".$_POST['register']."'");
  7. echo '<script language="JavaScript">window.location="?site=mainconfig";</script>';
  8. }
  9. if ($_GET['changestat'] == "yes"){
  10. mssql_query("UPDATE site_config SET enable_serverstatus = '".$_POST['serverstatus']."',exprate = '".$_POST['exprate']."',droprate = '".$_POST['droprate']."',questrate = '".$_POST['questrate']."',eggexprate = '".$_POST['eggexprate'].");
  11. echo '<script language="JavaScript">window.location="?site=mainconfig";</script>';
  12. }
  13.  
Reputation Points: 10
Solved Threads: 0
Newbie Poster
fortuNe1234 is offline Offline
2 posts
since Aug 2007
Aug 24th, 2007
0

Re: Parse error: syntax error, unexpected T_STRING in c:/..........

Files\wamp\www\working3\admincp\pages\mainconfig.php on line 11
it usually happen when you have an error in your if statement
if ()
{ }
elseif()
{ }
else
{ }
Reputation Points: 10
Solved Threads: 0
Newbie Poster
flagbarton is offline Offline
10 posts
since Aug 2007
Aug 24th, 2007
0

Re: Parse error: syntax error, unexpected T_STRING in c:/..........

Aahaa ok, i found it i think i forgot an " in the end of line 14, thanks alot for your help! =)
Reputation Points: 10
Solved Threads: 0
Newbie Poster
fortuNe1234 is offline Offline
2 posts
since Aug 2007

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in PHP Forum Timeline: Computer distinctive number
Next Thread in PHP Forum Timeline: Form syntax -driving me nuts





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC