Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 08-12-2002, 02:56 PM   PM User | #1
Galdo
New Coder

 
Join Date: Aug 2002
Posts: 76
Thanks: 0
Thanked 0 Times in 0 Posts
Galdo is an unknown quantity at this point
For and While Question

Hi, i am fairly new round here, and just wondered if anyone could help me.

I would like to display 8 select drop down menus. Each one of these has 8 choices, which are taken from a database. I am having some problems displaying them all though.

So far I have:

PHP Code:
<?
for($a=0;$a<8;$a++){
?>
<select size="1" name="blah">
<?
for($i=0;$row=mysql_fetch_row($SQL);$i++){
?>
<option><?echo "$row[0]";?></option>
<?
}
?>
<option selected>NONE</option>
</select>
<?
}
?>
This displays 8 select boxes, but only the first one has all the choices taken from the database, the others just have 'NONE'.

Any help would be greatly appreciated

Thanks.
Galdo is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 02:24 AM.


Advertisement
Log in to turn off these ads.