Re: Drop down box NOT populated

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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))
{
echo ' <option value="'.$row["account"].'">'.$row["account"]."</option>\n";
}


echo "</select>\n";
?>

-- Stuart

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux