You are here: Re: Forms and PHP « HTML « IT news, forums, messages
Re: Forms and PHP

Posted by oeb on 03/07/06 14:41

wes wrote:
> How dude?
>


First of this should really be asked in comp.lang.php but you can do it
something like this.




<?php
// Assume all your db connection stuff is here

$sql = "Select `names` from `table` WHERE 1";

$result = mysql_query($sql, $dblink);

while ($row = mysql_fetch_array($result)) {
$dropdown .= "<option value=\"$row[names]\">$row[names]</option>\n";
}
?>
<html>
<body>
<form method="post" action="target.php">
<select name="names">
<?=$dropdown;?>
</select>
</form>
</body>
</html>

 

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

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