OK,

I am working on my first shopping cart using PHP and MySQL and I am having a 
few problems.

The first problems is I need to bring out of a database a group of Jam 
flavors. I can do that but when certain items come up there needs to be the 
same flavors but repeated mutiple times and I am not sure how to get that to 
work. I also am having a problem adding mutiple flavors to my cookies for 
check out later

Here is the code to bring the flavor selection up once. What I need is to 
figure out a way to bring it up 3,4,5 times depending on which item is 
clicked.


<?php
// Send the Query to the Server, to get the list of flavors
if (!($result = mysql_db_query($DB,"SELECT * FROM extras WHERE name='$flav' 
ORDER BY 'choice'")))
{
   DisplayErrMsg(sprintf("internal error %d:%s\n",
      mysql_errno(), mysql_error()));
   return 0 ;
}

// Display the Items

?>
<font face="verdana" size="2" color="#000000">
<form name="thisform" action="<?php $PHPSELF;?>" method="post">
        <select>
        <option><?php echo $flav; ?>
<?php   while($row = mysql_fetch_array($result))
{
?>
        <option value="<?php echo $row["choice"]; ?>"><?php echo $row["choice"]; ?>
<?php
} // End of while loop
?>
</select>
</form>

that will bring up the set of flavors once i need to be able to bring it up 
more than once but keep it in the same format and set it to a cookie.

Any help would be great. The project is already overdue so I am sort of a 
hurry.

-Brian

_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to