You are here: Re: Populating <options> tag with SQL data? « PHP Programming Language « IT news, forums, messages
Re: Populating <options> tag with SQL data?

Posted by cresh on 05/03/07 18:44

> If you are getting results back from your database (e.g. MySQL), you can use a
> "while" loop to collect the information. This link at the PHP site would cover
> it in more detail
>
> http://www.php.net/manual/en/function.mysql-db-query.php
>
> but once you have the query setup you can built that into a variable such as...
>
> $option = '';
> while ($row = mysql_fetch_assoc($result))
> {
> $option .= "<option>" . $row['ColumnName'] . "</option>";
>
> }
>
> Tom


Thank you very much. It's great to find out information like this. I
appreciate it much.

Cresh

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация