<?php $user = secure($_SESSION['user']); ?>
<form action='' name='' method='post'>
<table align='center' width='400' class='maintable'>
<thead>
<tr>
<td align='center'>Stats Adder</td>
</tr>
</thead>
<tr>
<td align='center'>Select Character:
<select class='maintable' name='character'><optgroup label='Select a character'>
<?php
$charq = mssql_query("Select name,leveluppoint from Character where AccountID='$user'");
for($i=0;$i < mssql_num_rows($charq);++$i)
{
$row = mssql_fetch_row($charq);
echo"
<option value='$row[0]'><span class='maintable'><b>$row[0] [$row[1]]</span></option>
";
}
?>
</select>
</td>
</tr>
<tr><td align='center'><table width='400' align='center'>
<tr>
<td align='right' width='50%'>Strength:</td>
<td align='left'><input type='text' class='register_field' maxlength='5' name='strength'></td>
</tr>
<tr>
<td align='right'>Agility:</td>
<td align='left'><input type='text' class='register_field' maxlength='5' name='agility'></td>
</tr>
<tr>
<td align='right'>Vitality:</td>
<td align='left'><input type='text' class='register_field' maxlength='5' name='vitality'></td>
</tr>
<tr>
<td align='right'>Energy:</td>
<td align='left'><input type='text' class='register_field' maxlength='5' name='energy'></td>
</tr>
</table></td></tr>
</tr>
<td align='center'><input type='submit' name='addstats' value='Add Stats'></td>
</tr>
</tr>
<?php
if(isset($_POST['addstats'])) {add_stats(); }
?>
</table>
</form>