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]
|