//connect to database
if ($submit) {
mysql_connect($db_host,$db_username,$db_password) or die(mysql_error());
mysql_select_db($db_name) or die(mysql_error());
//run query to retrieve data from database for posts
$query = "SELECT name, email, message, date, FROM guestbook order by id DESC LIMIT 10";
$result = mysql_query($query);
//connect to database
if($submit)
{
mysql_connect($db_host,$db_username,$db_password) or die(mysql_error());
mysql_select_db($db_name) or die(mysql_error());
//run query to retrieve data from database for posts
$query = "SELECT name, email, message, date, FROM guestbook order by id DESC LIMIT 10";
$result = mysql_query($query);