MySQL_Narb Posted October 20, 2009 Share Posted October 20, 2009 Error: Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/runevid/public_html/Quests/quest1.php on line 23 Code: <?php session_start(); ?> <html> <head> <title>CrazyQuest - The online website for quests!</title> <link type="text/css" href="style.css" rel="stylesheet" media="screen" /> </head> <body> <center> <div id="container" > <div id="banner" > <img src="Images/logo.png" alt="" width="414" height="56" border="0" /> <h1>CrazyQuest</h1> </div> <?php if ($_SESSION['username']) { echo "<br /><br /><br /><b>Your walking along the road when you see police walking around and the flashing of police lights.<br /><b>You:</b> Whats going on here?!<br /><b>Cop:</b> We've got a coll for a robbery, and they've took a good amount of items.<br /><b>You:</b> This is the house of the little old lady correct?<br /><b>Cop:</b> I'm afraid so, you can talk to the little old lady over there (The officer points north)<br /><b>You:</b> Thanks officer<br /><b>You:</b> (Walks over to the Little old lady) Hello Ma'am.<br /><b>Little old lady:</b> Hello Dear, I guess you saw all this madness on your way home.<br /><b>You:</b> Yes, I saw all the police lights and thought something might have happened to you. Are you OK?<br /><b>Little old lady:</b> Oh yes, I'm fine. Do you think you could help find the robber?<br /><b>You:</b> Well, isn't that the Police's Job?<br /><b>Little old lady:</b> HAHAHA! Those police can't catch anything if they were even watching the robbery in progress! I believe you have some talent boy, last I heard from some of the people is that some other locals have been robbed. Go ask them for some other information.<?php $username = $_SESSION['username']; //connect $connect = mysql_connect("","","") or die("Connection failed!"); mysql_select_db("") or die("Database fail!"); //check to see if they have or haven't done the quest $get = mysql_query("SELECT * FROM users"); while ($row = mysql_fetch_assoc($get)) $check = $row['quest2_started']; if ($check ==1) { $link = "Continue quest"; } else { $link = "Accept quest"; } ?> <br /><br /><a href='quest1_walk.php'><?php echo $link; ?></a>"; } else { echo '<h3>Error</h3> <p>Please make sure that you are logged in before coming to this page!</p> </div>'; } ?> <div id="footer"><h1>Copyright 2009 - CrazyQuest</h1></div> </body> </html> Quote Link to comment https://forums.phpfreaks.com/topic/178401-another-error/ Share on other sites More sharing options...
trq Posted October 20, 2009 Share Posted October 20, 2009 Have you actually looked at your code? The syntax highlighting breaks where your error is. Quote Link to comment https://forums.phpfreaks.com/topic/178401-another-error/#findComment-940789 Share on other sites More sharing options...
Maq Posted October 21, 2009 Share Posted October 21, 2009 Maybe you should try an editor with syntax highlighting? Quote Link to comment https://forums.phpfreaks.com/topic/178401-another-error/#findComment-940792 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.