Hi 7724,
I take it you are looking for something like this on the page that you are designing.
I did this by using the following;
<?php
//Connect to database
$sql_server = "localhost";
$sql_username = "username";
$sql_password = "password";
$sql_database = "database";
global $sql_server;
global $sql_username;
global $sql_password;
global $sql_database;
$link = mysql_connect($sql_server, $sql_username, $sql_password)
or die("Could not connect : " . mysql_error());
mysql_select_db($sql_database) or die("Could not select database");
//Run Query. Change LIMIT for number of entries needed - Date is a column in the news table
query = mysql_query("SELECT * FROM news ORDER BY Date DESC LIMIT 3 ");
//Starts the on screen table
print "<table class=noborder align=center>";
//Makes the rows of the on screen table
while ($row = mysql_fetch_array($query, MYSQL_NUM))
{
//Takes the first 150 chars from the text entry for display
$col7 = substr($row[6],0,150);
//Changes date from database format to UK format.
$col2temp = $row[1];
$dbdateexplode=explode(' ',$col2temp);
$date=$dbdateexplode[0];
$dateexplode=explode('-',$date);
//Change this line to $col2new = $dateexplode[1]."/".$dateexplode[2]."/".$dateexplode[0]; for US format
$col2new = $dateexplode[2]."/".$dateexplode[1]."/".$dateexplode[0];
print "<tr><td>";
print $row[5];
print "</td><td align=right>";
print $col2new;
print "</td></tr>";
print "<tr><td colspan=2 class=news>";
print $col7;
print "....<a class=news href=morenews.php?newsitem=";
print $row[0];
print ">More</a>";
print "</td></tr>";
print "<tr><td colspan=2>";
print " ";
print "</td></tr>";
}
//Closes table
print "</table>";
?>
Cheers,
Neil.