Re: House Images Help
I have been trying and I just keep getting errors.. I thinks its because i'm still new...lmao... if you could help me that would be great
<?php
$housequery=1;
require "globals.php";
echo "<h2>General Info:</h2>";
$exp=(int)($ir['exp']/$ir['exp_needed']*100);
echo "
<table class='table'>
<tr>
<th>Name</th>
<th>Crystals</th>
<th>Level</th>
<th>Exp.</th>
<th>Money</th>
<th>Health</th>
<th>House</th>
</tr>
<tr>
<td><center>".$ir['username']."</center></td>
<td><center>".$cm."</center></td>
<td><center>".$ir['level']."</center></td>
<td><center>".$exp."</center></td>
<td><center>$fm</center></td>
<td><center>".$ir['hp']."</center></td>
<td><center>".$ir['hNAME']."</center></td>
</tr>
</table>
<h2>Stats:</h2>";
$ts=$ir['strength']+$ir['agility']+$ir['guard']+$ir['labour']+$ir['IQ'];
$ir['strank']=get_rank($ir['strength'],'strength');
$ir['agirank']=get_rank($ir['agility'],'agility');
$ir['guarank']=get_rank($ir['guard'],'guard');
$ir['labrank']=get_rank($ir['labour'],'labour');
$ir['IQrank']=get_rank($ir['IQ'],'IQ');
$tsrank=get_rank($ts,'strength+agility+guard+labour+IQ');
$ir['strength']=number_format($ir['strength']);
$ir['agility']=number_format($ir['agility']);
$ir['guard']=number_format($ir['guard']);
$ir['labour']=number_format($ir['labour']);
$ir['IQ']=number_format($ir['IQ']);
$ts=number_format($ts);
echo "
<table class='table'>
<tr>
<th>Strength</th>
<th>Agility</th>
<th>Guard</th>
<th>Labour</th>
<th>IQ</th>
<th>Total Stats</th>
</tr>
<tr>
<td><center>".$ir['strength']."</center></td>
<td><center>".$ir['agility']."</center></td>
<td><center>".$ir['guard']."</center></td>
<td><center>".$ir['labour']."</center></td>
<td><center>".$ir['IQ']."</center></td>
<td><center>".$ts."</center></td>
</tr>
</table>
<h2>Stats Rankings:</h2>
<table class='table'>
<tr>
<th>Strength</th>
<th>Agility</th>
<th>Guard</th>
<th>Labour</th>
<th>IQ</th>
<th>Total Stats</th>
</tr>
<tr>
<td><center>Number: ".$ir['strank']."</center></td>
<td><center>Number: ".$ir['agirank']."</center></td>
<td><center>Number: ".$ir['guarank']."</center></td>
<td><center>Number: ".$ir['labrank']."</center></td>
<td><center>Number: ".$ir['IQrank']."</center></td>
<td><center>Number: $tsrank</center></td>
</tr>
</table>
";
if(isset($_POST['pn_update']))
{
$update = sprintf("UPDATE users SET user_notepad = '%s' WHERE userid = '%u' ",
($_POST['pn_update']),
($ir['userid']));
mysql_query($update);
$ir['user_notepad']=stripslashes($_POST['pn_update']);
header('Location: index.php');
}
echo "
<hr>
Your Personal Notepad:
<form action='index.php' method='post'>
<textarea rows='10' cols='50' name='pn_update'>".htmlspecialchars($ir['user_notepad'])."</textarea>
<input type='submit' value='Update Notes' />
</form>";
$h->endpage();
?>