Jump to content

Archived

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

stringsbeast

need help

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]

Share this post


Link to post
Share on other sites
[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

Share this post


Link to post
Share on other sites
actually its this line thats giving the error
[code]print "Showing all monsters...<br>";[/code]
but thx for telling that

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

×

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.