Add more comments here.
| Datestamp |
Timestamp |
Name |
Comment |
Could not connect to MySQL");
// Select database
if (mysql_select_db($DBName, $connection) === FALSE)
die("Could not select database.
");
//prepare SQL SELECT
$query = sprintf("SELECT * FROM comments ORDER BY datestamp DESC limit 20");
//execute query
$result = mysql_query($query);
if ($result === FALSE)
die("Your history has not been recorded.");
while($row = mysql_fetch_array($result))
{
echo "| ";
echo $row['datestamp'];
echo " | ";
echo $row['timestamp'];
echo " | ";
echo " ";
echo $row['firstname'];
echo " | ";
echo " ";
echo $row['comments'];
echo " |
";
}
// Close database connection
mysql_close($connection);
?>