Thanks Adeptus, I think I will go away and read some tutorials, so to not fill up this forum with all my MySQL questions xD
However, I am probably doing something really stupid, but this is outputting no results, and I can't figure out why.
php code:
<?php echo '<table class="sortable2" id="reports" name="reports">
<tr>
<th><font face="Arial, Helvetica, sans-serif" size="3">SteamID</font></th>
<th><font face="Arial, Helvetica, sans-serif" size="3">VIP</font></th>
<th><font face="Arial, Helvetica, sans-serif" size="3">Upgrade 1</font></th>
<th><font face="Arial, Helvetica, sans-serif" size="3">Upgrade 2</font></th>
<th><font face="Arial, Helvetica, sans-serif" size="3">Upgrade 3</font></th>
<th><font face="Arial, Helvetica, sans-serif" size="3">Upgrade 4</font></th>
<th><font face="Arial, Helvetica, sans-serif" size="3">Upgrade Points</font></th>
<th><font face="Arial, Helvetica, sans-serif" size="3">Zombie Upgrade Points</font></th>
<th><font face="Arial, Helvetica, sans-serif" size="3">Bonus Upgrade Points</font></th>
<th><font face="Arial, Helvetica, sans-serif" size="3">Player Model</font></th>
</tr>';
?>
<?
mysql_connect("xxxxx","xxxxx","xxxx");
mysql_select_db("servers");
$search=$_POST["search"];
$search2 = mysql_real_escape_string($_POST['search']);
$result = mysql_query("SELECT a.*, b.playername
FROM upgrades a INNER JOIN zm_timetracker b ON a.steamid = b.steamid
WHERE b.playername LIKE '%$search2%'");
while($r=mysql_fetch_array($result))
{
$steam=$r["steamid"];
$dt=$r["vip"];
$pn=$r["playerupgrade1"];
$rs=$r["playerupgrade2"];
$rp=$r["playerupgrade3"];
$se=$r["playerupgrade4"];
$sns=$r["upgradepoints"];
$snr=$r["zombieupgradepoints"];
$snp=$r["bonusupgradepoints"];
$sn=$r["playermodel"];
echo "<tr><td>$steam</td><td>$dt</td><td>$pn</td><td>$rs</td><td>$rp</td><td>$se</td><td>$sns</td><td>$snr</td><td>$snp</td></tr>";
}
?>
</table>
I get no PHP errors, so I assume the syntax is all OK.