File random.php in CookBook
<?php include('Include/config.php'); ?> <html><head> <title>Random Recipie</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head><body> <?php $sql = "SELECT * FROM cookbook_recipes ORDER BY rand( ) LIMIT 1"; $result = mysql_query($sql); ?> <?php print(mysql_result($result,0,"title")); ?><br /> <?php print(mysql_result($result,0,"ingredients")); ?><br /> <?php print(mysql_result($result,0,"directions")); ?><br /> </body></html>
