Thanks again nanafreak
As you seem to be a php genius, I have something else you may be able to solve.
I am trying to query a database using the following code (censored):
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">Server Date/Time</font></th>
<th><font face="Arial, Helvetica, sans-serif" size="3">Server name</font></th>
<th><font face="Arial, Helvetica, sans-serif" size="3">Player name</font></th>
<th><font face="Arial, Helvetica, sans-serif" size="3">Reason</font></th>
<th><font face="Arial, Helvetica, sans-serif" size="3">Reporter</font></th>
</tr>';
?>
<?
mysql_connect("***","***","****");
mysql_select_db("servers");
$search=$_POST["search"];
$result = mysql_query("SELECT * FROM reports4 WHERE playername LIKE '%$search%'");
while($r=mysql_fetch_array($result))
{
$steam=$r["steamid"];
$dt=$r["datetime"];
$pn=$r["playername"];
$rs=$r["reason"];
$rp=$r["reporter"];
$sn=$r["servername"];
echo "<tr><td> $steam </td><br> <td>$dt </td><td>$sn</td><td>$pn</td><td>$rs</td><td>$rp</td></tr>";
}
?>
</table>
It works fine, however, when searching for someone who has multiple records, it finds all records, but has some huge space before they are displayed. You can try this at
http://sammyservers.com/reports/ . Try searching for example "sakura", which works fine, and then try "zombie". You will see the difference.