Re: how to make a dropdown list with sql content

From: Date: Mon, 10 Dec 2001 16:05:14 +0000
Subject: Re: how to make a dropdown list with sql content
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-14905@lists.php.net to get a copy of this message
"Venomous" <venomous@zeelandnet.nl> wrote in message news:20011210140555.32275.qmail@pb1.pair.com... > I need to make a dropdown menu from my mysql database but i don't no how to > come about > > It's the meaning that i don't get weird things in my database for instants > > PI 300 or pi 300 think about what your generated output should like like: something like <SELECT> <OPTION>First Item <OPTION>Second Item <OPTION>Third Item {...} </SELECT> So your PHP should do something like echo "\n <SELECT>"; while($row = mysql_fetch_array($conn)) echo "\n <OPTION>".$row["item"]; echo "\n </SELECT"; Exactly what appears in the list will depend on what you echo in the loop. Hope that's what you were looking for...

« previous php.db (#14905) next »