Jump to content

need help


stringsbeast

Recommended Posts

im getting this error
on my other file it is the same and it works but on this one im getting this

PHP Parse error: parse error, unexpected T_STRING in C:\Documents and Settings\Kevin\Mijn documenten\monsters.php on line 139

[code]<?php
if (!$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]
Link to comment
https://forums.phpfreaks.com/topic/10604-need-help/
Share on other sites

[!--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.
Link to comment
https://forums.phpfreaks.com/topic/10604-need-help/#findComment-39553
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.