stringsbeast Posted May 27, 2006 Share Posted May 27, 2006 im getting this erroron my other file it is the same and it works but on this one im getting thisPHP Parse error: parse error, unexpected T_STRING in C:\Documents and Settings\Kevin\Mijn documenten\monsters.php on line 139[code]<?phpif (!$action && !$battle) {print "Welcome to the Monster battle arena.<br><br>- <a href=monsters.php?action=monsterlist>List all monsters</a>.<br>}if ($action == monsterlist) {line 139 print "Showing all monsters...<br>";print "<table><tr><td width=20><b><u>ID</td><td width=100><b><u>Name</td><td width=100><b><u>Options</td></tr>";$esel = mysql_query("select * from players where level=$stat[level] and hp>0 limit 5000 ");while ($elist = mysql_fetch_array($esel)) {print "<tr><td>$elist[id]</td><td><a href=view.php?view=$elist[id]>$elist[user]</a></td><td>- <A href=battle.php?battle=$elist[id]>Attack</a></td></tr>";}print "</table><br>";print "Or you can always... <a href=monsters.php>go back</a>.";}[/code] Quote Link to comment https://forums.phpfreaks.com/topic/10604-need-help/ Share on other sites More sharing options...
Ferenc Posted May 27, 2006 Share Posted May 27, 2006 [code]print "Welcome to the Monster battle arena.<br><br>- <a href=monsters.php?action=monsterlist>List all monsters</a>.<br>";[/code]You forgot to end the print Quote Link to comment https://forums.phpfreaks.com/topic/10604-need-help/#findComment-39549 Share on other sites More sharing options...
stringsbeast Posted May 27, 2006 Author Share Posted May 27, 2006 actually its this line thats giving the error[code]print "Showing all monsters...<br>";[/code]but thx for telling that Quote Link to comment https://forums.phpfreaks.com/topic/10604-need-help/#findComment-39550 Share on other sites More sharing options...
Ferenc Posted May 27, 2006 Share Posted May 27, 2006 [!--quoteo(post=377670:date=May 27 2006, 04:38 PM:name=stringsbeast)--][div class=\'quotetop\']QUOTE(stringsbeast @ May 27 2006, 04:38 PM) [snapback]377670[/snapback][/div][div class=\'quotemain\'][!--quotec--]actually its this line thats giving the error[code]print "Showing all monsters...<br>";[/code][/quote] unexpected T_STRING errors are generaly located in the lines above the error code.Since you didnt end the print, php looks for a " ,since that is how you started it, it therfore needs to end some where. after that is also expects an end --> ; Your code errors in line 139 because that is where the nearest double quote is located. Quote Link to comment https://forums.phpfreaks.com/topic/10604-need-help/#findComment-39553 Share on other sites More sharing options...
stringsbeast Posted May 27, 2006 Author Share Posted May 27, 2006 ok thxgot rid off that error Quote Link to comment https://forums.phpfreaks.com/topic/10604-need-help/#findComment-39555 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.