Re: Drop down box NOT populated
| From: | Stuart | Date: | Thu, 22 Jan 2004 15:49:13 +0000 |
| Subject: | Re: Drop down box NOT populated | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-32586@lists.php.net to get a copy of this message | ||
Larry Sandwick wrote:
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 ! <? 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"; ^^^^^^^^^^^^^^^^^^Try removing this line.
while ($row = mysql_fetch_array($sql)) {-- Stuartecho ' <option value="'.$row["account"].'">'.$row["account"]."</option>\n";} echo "</select>\n"; ?>