include("$opendatabase");
$query = "SELECT p, title FROM `tbt_poetry` ORDER BY RAND( ) LIMIT 1";
$result = mysql_query($query) or die("Couldn't fetch random poem");
$num = mysql_num_rows($result);
if ($num > 0)
{
$p = mysql_result($result, 0, "p");
$title = mysql_result($result, 0, "title");
echo "
";
echo "Redirecting to...
";
echo "$title
";
echo "If you are not redirected, please click here.";
?>
;
}
?>