Hello,
I am trying to display data from a mysql database and output it into an html table. So I am basicallly trying to create a news system. I already have a script to output the data on a webpage, I am just trying to put this data in a html table.
How can I format this output in a html table?
Here is my script:
<?php
$db=mysql_connect("localhost","chatspea","");
mysql_select_db("chatspea_news", $db) or die (mysql_error());
$result = mysql_query('SELECT * FROM `postnews` LIMIT 0, 10');
while($row= mysql_fetch_array($result)){
echo"<hr>";
echo "Subject:";
echo $row['Subject'];
echo "<br>";
echo "Author:";
echo $row['Author'];
echo "<br>";
echo "Date:";
echo $row['Data'];
echo "<br>";
echo "Message:";
echo $row['Message'];
echo "<br>";
}
?>
Thanks,
Dylan Alllingham