Hey everyone.
I'm having problems with my scrappy code. It only serves as a purpose to show me the recipes that I have acquired.. Only problem is it is showing just the first ingredient.. Doesn't even show me the name of the recipe??
Here's the code I have written up:
and here is a sample sqlPHP Code:<?php
$recipe = "Coffee and Date Dough"; // this isn't normally hard coded..
echo('<table width="25%" border="1">');
// This basically gets all of the recipe into an array
$query = mysql_query("SELECT * FROM recipe WHERE recipe='{$recipe}'");
$count = 1;
while($row = mysql_fetch_array($query)){
// Couldn't think of a better way to count to 18 without using something like this.
$ing = "ing".$count;
$per = "per".$count;
// Echo out the table information
echo("<tr><td>$row[$ing]</td><td>$row[$per]</td></tr>");
$count++;
}
echo("</table>");
?>
@robbie! ?






Reply With Quote







