Forum Moderators: coopster

Message Too Old, No Replies

Cannot find Parse error.

2:02 am lol Im tired

         

dkin

6:02 am on Jul 17, 2004 (gmt 0)

10+ Year Member



I can not find the parse error in this bit of code.

$rzones = "";
for($i=0;$i<sizeof($zones);$i++)
{
if($rzones=="")
$rzones = $zones[$i];
else
$rzones = $rzones.", ".$zones[$i];
}

$prizes = "$prize1 $prize2 $prize3 $prize4 $prize5";

$query = "insert into nuke_quest_database (Class,Race,Level,Start_Zone,Start_NPC,Directions, Description,Walkthrough,End_NPC,Zones,Rewards,Difficulty,Time,user) values ('". $Class."','". $Race."','". $Level."','". $Zone."','". $start_npc."','". $directions."','". $description."','". $walkthrough."','". $end_npc."','". $rzones."','". $prizes."','". $difficulty."','". $time."','". $cookie."')";
mysql_query($query);

OpenTable();
print "The Quest has been submitted.";
CloseTable();
include("footer.php");
?>

It is on the Query line, if you find it please let me know.

Thank you kindly.

[1][edited by: jatar_k at 5:48 pm (utc) on July 17, 2004]
[edit reason] fixed sidescroll [/edit]

jatar_k

5:49 pm on Jul 17, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



what is the error you are getting?

dkin

6:43 pm on Jul 17, 2004 (gmt 0)

10+ Year Member



Parse error: parse error in /home/eqoagui/public_html/modules/Quest_Database/insert_quest.php on line 23
Sorry, such file doesn't exist...

That is my error, my query line is line 23

rlkanter

7:14 pm on Jul 17, 2004 (gmt 0)

10+ Year Member



The creation of the query string itself looks fine. It is saying that a file doesn't exist?

dkin

7:42 pm on Jul 17, 2004 (gmt 0)

10+ Year Member



yes, usually when I get that error it is because I am missing a " or a ;. But I do not see any of these missing.

isorg

9:35 pm on Jul 17, 2004 (gmt 0)

10+ Year Member



Are you sure you have the right line number?

Either the file is missing, or it is a parse error (because you've missed out a ; - i.e. a syntax error). It seems puzzling that it is saying both... is line 23 really the query line?

Try stripping out blocks of code and seeing if it will accept the remainder, then you can narrow down where the problem code is (rather than relying only on the line number).

dkin

7:28 am on Jul 18, 2004 (gmt 0)

10+ Year Member



I figured it out, for some reason my ftp was not uploading so I was not actually changing the page on my site, Uggghhh