I don’t know how you’re connecting to your mysql database, but ive included the basics as if you had the defaults from installing XAMPP.
<?php
$db = mysql_connect("localhost","root");
mysql_select_db("my_database");
$entries = array();
$sql = "SELECT
`field`
FROM
`tablename`
ORDER BY
`id` DESC
LIMIT 10";
$query = mysql_query($sql);
while(($row = mysql_fetch_assoc($query)) !== false)
{
$entries[] = $row['field'];
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title></title>
</head>
<body>
<p>
Last 10 entries (most recent at the top):
</p>
<ul>
<?php
foreach($entries as $entry)
{
echo "<li>".$entry."</li>";
}
?>
</ul>
</body>
</html>
Of course you will need to modify this depending on what limit you want (if any), your database connection, table name, field name etc but let me know if this helps you at all.