On 19-Sep-2001 Neil Silvester wrote:
> I am having a little problem with a PHP 4 statement in one of my webpages. I
> am using a drop down box of selections that is built a table in a MySQL 
> database.
> This is what I have so far (everything works well, the correct information 
> is displayed for both the Category and ID column values.
> 
> <select name="Product">
>       <option>Please select a category...</option>
> <?php
> // display entries in the selection box and
> // associate the column ID of each entry
> while ($row = mysql_fetch_array($result)) {
>       echo("<option value=" . $row["ID"] . ">" . $row["Category"] .
"</option>");

   printf('<option value="%s">%s</option>',
     $row["ID"], $row["Category"]);


Regards,
-- 
Don Read                                       [EMAIL PROTECTED]
-- It's always darkest before the dawn. So if you are going to 
   steal the neighbor's newspaper, that's the time to do it.
                            (53kr33t w0rdz: sql table query)

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to