Re: Drop down box NOT populated
| From: | Ricardo Lopes | Date: | Thu, 22 Jan 2004 15:50:31 +0000 |
| Subject: | Re: Drop down box NOT populated | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-32587@lists.php.net to get a copy of this message | ||
----- Original Message -----
From: Larry Sandwick
To: php-db@lists.php.net
Sent: Thursday, January 22, 2004 3:46 PM
Subject: [PHP-DB] Drop down box NOT populated
Can anyone tell me what I am missing here,
The Select statement does not populate my drop down window?
My drop down box is empty !
[snip]
<?
include '../db.php';
$how = mysql_query("SELECT count(distinct(account)) from Backlog") or die
("Something bad happened: " . mysql_error());
$how_many = mysql_result($how, 0);
echo "<h3>$how_many Accounts to pick from !!!</h3>";
$sql = mysql_query("SELECT distinct(Account) FROM Backlog")or die ("Something bad
happened here: " . mysql_error()) ;
echo "<select name=\"account\">\n";
echo "<option>\n"; <<<<---------- WHAT IS THIS DOING HERE !!!!!
while ($row = mysql_fetch_array($sql))
{
echo ' <option
value="'.$row["account"].'">'.$row["account"]."</option>\n";
}
echo "</select>\n";
?>
[end snip]
Larry Sandwick
Sarreid, Ltd.
Network/System Administrator
phone: (252) 291-1414 x223
fax : (252) 237-1592