MySQL unavailable.
Please try again in a little bit.
If problem persists, please report this error to the site admin.
");
exit();
}
// Open database
if(!@mysql_select_db("manmaru_wedding"))
{
echo("View the Guestbook
Unable to connect to the wedding database.
Please try again in a little bit.
If problem persists, please report this error to the site admin.
");
mysql_close($dbWedding);
exit();
}
// Make query, sort by timestamp
$sqlQuery = "SELECT * FROM guestbook ORDER BY timestamp DESC";
$sqlResults = mysql_query($sqlQuery);
if(!$sqlResults)
{
echo("Please try again in a little bit.
If problem persists, please report this error to the site admin.
Error when making top-level query.
Please try again in a little bit.
If problem persists, please report this error to the site admin.
");
exit();
}
// If no entries, output a special "no entries yet" message
if(mysql_num_rows($sqlResults) < 1)
{
echo(" \n");
}
else
{
// Loop through results and create output table-ified HTML entries
while($sqlRow = mysql_fetch_array($sqlResults))
{
echo("Please try again in a little bit.
If problem persists, please report this error to the site admin.
| Author | Comment |
|---|---|
| \n");
echo(" " . htmlentities($sqlRow["name"], ENT_QUOTES) . " \n"); if($sqlRow["location"] != "") echo(" " . htmlentities($sqlRow["location"], ENT_QUOTES) . " \n"); //echo(" " . htmlentities($sqlRow["email"]) . " \n"); //echo(" " . $sqlRow["ip"] . " \n"); echo(" | \n");
echo("