So I am making a HTML table using PHP, and mySQL.
Here is the SOURCE:
<?php
$con = mysql_connect("host","name","pass");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("Garrysmod_Data", $con);
$result = mysql_query("SELECT * FROM Bans");
while($row = mysql_fetch_array($result))
echo "<table width='823' border='1' cellpadding='0' cellspacing='1' bordercolor='#000000' bgcolor='#999999' align='center'>
<tr>
<th width='120' height='32' bordercolor='#000000' bgcolor='#666666' scope='col'><span class='style28'>In Game Name</span></th>
<th width='128' bordercolor='#000000' bgcolor='#666666' scope='col'><span class='style28'>STEAM ID</span></th>
<th width='91' bordercolor='#000000' bgcolor='#666666' scope='col'><span class='style28'>TIME BANNED</span></th>
<th width='87' bordercolor='#000000' bgcolor='#666666' scope='col'><span class='style28'>AMOUNT BANNED</span></th>
<th width='231' bordercolor='#000000' bgcolor='#666666' scope='col'><span class='style28'>REASON</span></th>
<th width='122' bordercolor='#000000' bgcolor='#666666' scope='col'><span class='style28'>ADMIN</span></th>
</tr>";
while($row = mysql_fetch_array($result))
{
echo "<tr>";
echo "<td align='center' height='28' bordercolor='#000000' bgcolor='#666666'>" . $row['In_Game_Name'] . "</td>";
echo "<td align='center' height='28' bordercolor='#000000' bgcolor='#666666'>" . $row['Steam_ID'] . "</td>";
echo "<td align='center' height='28' bordercolor='#000000' bgcolor='#666666'>" . $row['Time_Banned'] . "</td>";
echo "<td align='center' height='28' bordercolor='#000000' bgcolor='#666666'>" . $row['Ammount_Banned'] . "</td>";
echo "<td align='center' height='28' bordercolor='#000000' bgcolor='#666666'>" . $row['Reason'] . "</td>";
echo "<td align='center' height='28' bordercolor='#000000' bgcolor='#666666'>" . $row['Banner'] . "</td>";
echo "</tr>";
}
echo "</table>";
?>
Now you saw the code. Now look at the page. lol Something went wrong here. Help me if you can.