hi,
I'm newbie in programming...tried to do a dropdown using the code below but i can't make it works. Maybe there is mistake on my codes. Anybody plz help me...
Edited to add code tags
I'm newbie in programming...tried to do a dropdown using the code below but i can't make it works. Maybe there is mistake on my codes. Anybody plz help me...
<?php
global $database;
$database->setQuery( "SELECT * FROM #__chronoforms_15;" );
if (!$database->query()) {
echo "<script> alert('".$database->getErrorMsg()."');
window.history.go(-1); </script>
";
$rows = $database->loadObjectList();
}
?>
<select name="orgtype_id">
<?php
foreach($rows as $key=>$value) {
?>
<option value="<?= $value["cf_id"] ?>">
<?= $value["orgtype_name"] ?></option>
<?php
}
?>
</select>
Edited to add code tags