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>
 
 
  code/cookbookrandom.txt · Last modified: 2005/01/06 11:44
 
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki