|
Posted by Damo on 11/30/06 22:46
Hi,
I'm trying to dynamically generate a html select list from a MS Access
database using the code below:
<?php
$conn=odbc_connect('customer','','')or die('Could Not Connect to ODBC
Database!');
$queryexe="SELECT * FROM types";
$rs=odbc_exec($conn , $queryexe)or die("Query failed: $sql<br />Error:
".mysql_error()."<br />");
echo "<SELECT name="typeId">";
while(odbc_fetch_row($rs))
{
echo "<option>".odbc_result($rs,"typeId")."</option>";
}
echo "</SELECT>";
?>
Its giving a sql error when i try it.
Can anyone help?
Navigation:
[Reply to this message]
|