apologies for answering such an already-over-answered question, but i feel
that no-one has given a particularly *good* answer, so i'll add mine to the
list. I use this function (as well as a couple others which do similar
things for all form elements;
// Creates an HTML select box of values.
// $
ent: Wednesday, January 30, 2002 8:48 AM
Cc: Php-DB
Subject: RE: [PHP-DB] Drop down list
First conect to DB
$result=mysql($DBname,"SELECT * FROM table where 1");
$no=mysql_numrows($result);
$i=0;
$string="";
while ($i<$no){
$string.="".mysql_result($result,$i
First conect to DB
$result=mysql($DBname,"SELECT * FROM table where 1");
$no=mysql_numrows($result);
$i=0;
$string="";
while ($i<$no){
$string.="".mysql_result($result,$i,"artist")."";
$i++;}
$string="$string";
and in string is drop down menu.
EXO (www.exo.sk)
> > -Original Mess
-
From: Piotrek [mailto:[EMAIL PROTECTED]]
Sent: 30. tammikuuta 2002 14:36
To: [EMAIL PROTECTED]; Php-DB
Subject: Re: [PHP-DB] Drop down list
OK. Someone else has already answered the question, so you could shut up
and stop teaching us all how to deal with newbies. This way you'll help
"in a
MAIL PROTECTED]>
Sent: Wednesday, January 30, 2002 12:52 PM
Subject: RE: [PHP-DB] Drop down list
Well, true. :)
There is a but: I think it's stupid to try to get the solution from
others while the information is very easy to find by reading the manual.
This issue is about _very_ basic stu
know. Or again, read some tutorial about it.
Niklas
-Original Message-
From: George Lioumis [mailto:[EMAIL PROTECTED]]
Sent: 30. tammikuuta 2002 11:50
To: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] Drop down list
I think you should be more polite with newbies. If you don't want to
1. Do query
2. Loop thru query results and write HTML for dropdown
I think you should know atleast the basics of SQL + HTML before asking
stuff here. There are whole lot of tutorials around the net.
Niklas
-Original Message-
From: B.J.Rumsey [mailto:[EMAIL PROTECTED]]
Sent: 30. tammi