RE: [PHP-DB] Drop down list
| From: | Julius Dlugolinsky | Date: | Wed, 30 Jan 2002 14:48:05 +0000 |
| Subject: | RE: [PHP-DB] Drop down list | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-16310@lists.php.net to get a copy of this message | ||
First conect to DB
$result=mysql($DBname,"SELECT * FROM table where 1");
$no=mysql_numrows($result);
$i=0;
$string="";
while ($i<$no){
$string.="<option
value=\"".mysql($result,$i,"$artist_id")."\">".mysql_result($result,$i,"artist")."</option>";
$i++;}
$string="<select name=artist>$string</select>";
and in string is drop down menu.
EXO (www.exo.sk)
> > -----Original Message-----
> > From: B.J.Rumsey [mailto:webmaster@musicsearch.ath.cx]
> > Sent: 30. tammikuuta 2002 10:18
> > To: php-db
> > Subject: [PHP-DB] Drop down list
> >
> >
> > I have two fields artist_id, artist. How do I put the contents of
> > "artist" into a dropdown list.
> >
> >
> > ____________________________________________________
> > IncrediMail - Email has finally evolved - Click Here
> >
> >
> > --
> > PHP Database Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net
> > For additional commands, e-mail: php-db-help@lists.php.net
> > To contact the list administrators, e-mail:
> > php-list-admin@lists.php.net
> >
> >
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net
> For additional commands, e-mail: php-db-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
>
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net
> For additional commands, e-mail: php-db-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net
> For additional commands, e-mail: php-db-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
>