I tried to rewrite the code.. I think this is the way to do it, however I still get an error
Parse error: syntax error, unexpected T_STRING in /home/lrpc/public_html/play/fightspawn.php on line 428
Everything worked fine until I added the line:
$page .= "<form action=index.php?do=fightmonster method=post>.. <input type=submit value='Atack monster' name=monster1>..</form>";
So I am sure it is somehting simple that I forgot to add, however I can't erase the line because I really need to implement that feature. Could someone please assist?
$page = "Congratulations. You have defeated the ".$monsterrow["name"].".<br />You gain $exp experience. $warnexp <br />You gain $gold gold. $warngold <br /><br />";
if (rand(1,30) == 1) {
$dropquery = doquery("SELECT * FROM {{table}} WHERE mlevel <= '".$monsterrow["level"]."' ORDER BY RAND() LIMIT 1", "drops");
$droprow = mysql_fetch_array($dropquery);
$dropcode = "dropcode='".$droprow["id"]."',";
$page .= "This monster has dropped an item. <a href=\"index.php?do=drop\">Click here</a> to reveal and equip the item, or you may also move on and continue <a href=\"index.php\">exploring</a>.";
} else {
$dropcode = "";
$page .= "You can now continue <a href=\"index.php\">exploring</a>.";
$page .= "<form action=index.php?do=fightmonster method=post>.. <input type=submit value='Atack monster' name=monster1>..</form>";
";
}
$title = "Victory!";
}
}
$updatequery = doquery("UPDATE {{table}} SET currentaction='Exploring',level='$newlevel',maxhp='$newhp',maxmp='$newmp',maxtp='$newtp',strength='$newstrength',dexterity='$newdexterity',attackpower='$newattack',defensepower='$newdefense', $newspell currentfight='0',currentmonster='0',currentmonsterhp='0',currentmonstersleep='0',currentmonsterimmune='0',currentuberdamage='0',currentuberdefense='0',$dropcode experience='$newexp',gold='$newgold' WHERE id='".$userrow["id"]."' LIMIT 1", "users");
display($page, $title);
}