help
Posted: Mon Nov 24, 2014 10:30 am
hy!
I need help with this.
<?php
include_once 'connect.php';
session_start();
include_once 'logo.php';
?>
<link href="style.css" rel="stylesheet" type="text/css" />
<?php
if (isset($_SESSION['player']))
{
$player=$_SESSION['player'];
}
else
{
echo "Not Logged in <br><br> <A href='login.php'>Login</a>";
exit;
}
$playerinfo="SELECT * from players where name='$player'";
$playerinfo2=mysql_query($playerinfo) or die("could not get player stats!");
$playerinfo3=mysql_fetch_array($playerinfo2);
include_once 'statpanel.php';
$playerid = $playerinfo3['id'];
?>
</div>
<div id="table">
<?php
$counter = 0;
echo "<small>";
print "<center>";
print "<table border='0' width='70%' cellspacing='20'>";
print "<tr><td width='25%' valign='top'>";
print "</td>";
print "<td valign='top' width='75%'>";
$invinfo="SELECT * from playermagic where pid='$playerid'";
$invinfo2=mysql_query($invinfo) or die("could not select player magic");
print "<table border='1' bordercolor='white' bgcolor='#ffffff'>";
print "<tr><td>Name<font color='ffffff'>________________</font></td><td>Level<font color='ffffff'>______</td><td>Type<font color='ffffff'>______</td><td>Value<font color='ffffff'>______</td><td>Point Cost<font color='ffffff'>______</td><td><font color='ffffff'>________________</td></tr>";
while($invinfo3=mysql_fetch_array($invinfo2))
{
print "<tr><td>$invinfo3[name]</td><td>$invinfo3[level]</td><td>$invinfo3[type]</td><td>$invinfo3[svalue]</td><td>$invinfo3[scost]</td><td><A href='attack.php?sid=$invinfo3[sid]'>Use Magic</td></tr>";
$counter = 1;
}
print "</table>";
print "</td></tr></table>";
print "</center>";
echo "</small>";
if ($counter == 0)
{
echo "<center>You have no Spells!<br>";
echo "<a href='battle.php>Go Back</center>";
exit;
}
echo "<center><a href='battle.php>NeverMind</center>";
?>
</div>
thia is halls usemagic code. I wanna do a option menu like he did in the register.php where u choose the class instead of this but my html knowledge is bellow 0. But I don't whant a select button. the moment a spell is chosen I whant to use that spell directly,since I will add more spell classes each with a different menu.
tanks in advance and I sincerilly do apologise for my bad English but I stuffer a massive hangover from last night
I need help with this.
<?php
include_once 'connect.php';
session_start();
include_once 'logo.php';
?>
<link href="style.css" rel="stylesheet" type="text/css" />
<?php
if (isset($_SESSION['player']))
{
$player=$_SESSION['player'];
}
else
{
echo "Not Logged in <br><br> <A href='login.php'>Login</a>";
exit;
}
$playerinfo="SELECT * from players where name='$player'";
$playerinfo2=mysql_query($playerinfo) or die("could not get player stats!");
$playerinfo3=mysql_fetch_array($playerinfo2);
include_once 'statpanel.php';
$playerid = $playerinfo3['id'];
?>
</div>
<div id="table">
<?php
$counter = 0;
echo "<small>";
print "<center>";
print "<table border='0' width='70%' cellspacing='20'>";
print "<tr><td width='25%' valign='top'>";
print "</td>";
print "<td valign='top' width='75%'>";
$invinfo="SELECT * from playermagic where pid='$playerid'";
$invinfo2=mysql_query($invinfo) or die("could not select player magic");
print "<table border='1' bordercolor='white' bgcolor='#ffffff'>";
print "<tr><td>Name<font color='ffffff'>________________</font></td><td>Level<font color='ffffff'>______</td><td>Type<font color='ffffff'>______</td><td>Value<font color='ffffff'>______</td><td>Point Cost<font color='ffffff'>______</td><td><font color='ffffff'>________________</td></tr>";
while($invinfo3=mysql_fetch_array($invinfo2))
{
print "<tr><td>$invinfo3[name]</td><td>$invinfo3[level]</td><td>$invinfo3[type]</td><td>$invinfo3[svalue]</td><td>$invinfo3[scost]</td><td><A href='attack.php?sid=$invinfo3[sid]'>Use Magic</td></tr>";
$counter = 1;
}
print "</table>";
print "</td></tr></table>";
print "</center>";
echo "</small>";
if ($counter == 0)
{
echo "<center>You have no Spells!<br>";
echo "<a href='battle.php>Go Back</center>";
exit;
}
echo "<center><a href='battle.php>NeverMind</center>";
?>
</div>
thia is halls usemagic code. I wanna do a option menu like he did in the register.php where u choose the class instead of this but my html knowledge is bellow 0. But I don't whant a select button. the moment a spell is chosen I whant to use that spell directly,since I will add more spell classes each with a different menu.
tanks in advance and I sincerilly do apologise for my bad English but I stuffer a massive hangover from last night