bit confused here, im trying to echo out multiple results from a database and returning them in a table. Each new row in the database leads should lead to a new row in the HTML table.
However I can only get it so the first row from the database goes into the html table as it should, the rest go outside it. Any ideas?
$query = "SELECT * FROM 070208_new";
$result = mysql_query($query)
or die ("This entry hasn't been found.");
while($row = mysql_fetch_array($result))
{
$log_id = $row['log_id'];
$time = $row['time'];
$s_ip = $row['s-ip'];
$cs_method = $row['cs-method'];
$cs_uri_stem = $row['cs-uri-stem'];
$cs_uri_query = $row['cs-uri-query'];
$port = $row['port'];
$cs_username = $row['cs-username'];
$c_ip = $row['c-ip'];
$user_agent = $row['cs(User-Agent)'];
$sc_status = $row['sc-status'];
$sc_substatus = $row['sc-substatus'];
$sc_win32_status = $row['sc-win32-status'];
$sc_bytes = $row['sc-bytes'];
$cs_bytes = $row['cs_bytes'];
echo "<tr>
<td>$log_id</td>
<td>$time</td>
<td>$s_ip</td>
<td>$cs_method</td>
<td>$cs_uri_stem</td>
<td>$cs_uri_query</td>
<td>$port</td>
<td>$cs_username</td>
<td>$c_ip</td>
<td>$user_agent</td>
<td>$sc_status</td>
<td>$sc_substatus</td>
<td>$sc_win32_status</td>
<td>$sc_bytes</td>
<td>$cs_bytes</td>
</tr>";
echo "</table>";
}