Insert db values into dropdown box error
| From: | Edward Dias | Date: | Thu, 09 Dec 2004 19:16:27 +0000 |
| Subject: | Insert db values into dropdown box error | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-37651@lists.php.net to get a copy of this message | ||
Hi,
I would like insert into a dropdown box values from my mysql database
column
Using the sample below I'm getting this error (Parse error: parse error,
unexpected) on this line (while($row=mysql_fetch_array($result)({ )
But I'm not able to identify the problem, Any help is greatly
appreciated
TIA
<tr>
<td>Project Number:</td>
<td>
<?
require_once("DB.php");
$sql=("SELECT project_number
FROM projects
ORDER BY project_number");
//$result=mysql_query($query);
$result = $db->query($sql);
if( DB::isError($result) ) {
die ($result->getMessage());
}
// start the select box
echo "<select project_number='project_number'>\n";
while($row=mysql_fetch_array($result)({
echo "<option
value=\"$row[project_number]\">$row[project_number]</option>\n";
}
echo "</select>";
?>
</tr>
Edward
--------------------------------------------------------
This electronic mail message contains information belonging to PaymentOne, which may be confidential
and/or legal privileged. The information is intended only for the use of the individual or entity
named above. If you are not the intended recipient, you are hereby notified that any disclosure,
printing, copying, distribution, or the taking of any action in reliance on the contents of this
electronically mailed information is strictly prohibited. If you receive this message in error,
please immediately notify us by electronic mail and delete this message.
--------------------------------------------------------