Hi all, I got a weird problem which I had never before.
When I use:
$player=$_SESSION['player'];
$sfield="SELECT * from km_sfield where name='$player'";
$sfield2=mysql_query($sfield) or die(mysql_error());
$sfield3=mysql_fetch_array($sfield2) or die(mysql_error());
Every code belows it like tables and stuff dont show up.
<?php
$player=$_SESSION['player'];
$sfield="SELECT * from km_sfield where name='$player'";
$sfield2=mysql_query($sfield) or die(mysql_error());
$sfield3=mysql_fetch_array($sfield2) or die(mysql_error());
function DisplayGrid($gridx,$gridy) {
global $x, $y;
$bgcolor = 'background="http://conquerorsofsanvia.890m.com/background/grass.gif"';
//highlight current select grid coordinate
if ($gridx == $x && $gridy == $y) {
$bgcolor = 'background="http://conquerorsofsanvia.890m.com/background/grass.gif"';
}
if ($gridx == $sfield3[x] && $gridy == $sfield3[y]) {
$imgsrc = 'img src="http://conquerorsofsanvia.890m.com/images/bowman.png"';
}
echo "<td width=\"50\" height=\"50\" $bgcolor align=center valign=bottom><a style='line-height:1em;width:75%;height:75%;display:block;' href=\"grid.php?xcord=$gridx&ycord=$gridy\"></a><br><font size=1 color='blue'>($gridx,$gridy)</font></td>";
}
[B] print "<table class='maintable'><tr class='headline'><td><center>Deploy Soldiers</center></td></tr>";
print "<tr class='mrw'><td>";
print "Each unit contains a squad of 100 units from the same class.<br>";
print "<form action='dplsoldiers.php' method='post'>";
print "<SELECT NAME='class'>";
print "<OPTION VALUE='Pikeman'>Pikeman";
print "<OPTION VALUE='Archers'>Archers";
print "<OPTION VALUE='Swordsman'>Swordsman";
print "<OPTION VALUE='Cavalry'>Cavalry";
print "</SELECT>";
print "<input type='submit' name='submit' value='submit'></form>";
print "</td></tr></table>";[/B]
?>
If I use that code the part between fat doesn't shows.
I don't see what I am doing wrong and this is the first time that I get this error.