Hi all,
i have a drop down menu on my form and i would like it to display all values from a field in my database. This is what i have so far...
-------------------------------------------------------------
<select name=\"event\">");
$db = connect();
$sql = "SELECT Event_Name FROM tblevent";
foreach($db->query($sql) as $selected_event) {
$page->addToBody("<option value=\"".$selected_event."\">".$selected_event."</option>");
}
$page->addToBody("</select><br />
-------------------------------------------------------------
The problem is, the values in the drop down menu are all "Array".
I'd like them to be all the different events.
Any help will be greatly appreciated.
Cheers
Lewis


Reply With Quote
Bookmarks