I am attempting to include a PHP/MYSQL populated pull-down in a form that is created with a <fieldset> option. If I run the script to create to pull down by itself it works fine, but when I try to put it into the form, a pull-down is not created.
I've posted the code below - am I missing something simple?
// populate project pull-down menu
$query_projpull = "SELECT cds_proj_id, cds_proj_name
FROM cds_projects ORDER BY cds_proj_name ASC";
$pull_proj = @ ($query_projpull);
$pulldown_proj = '<option>- - Choose Project - - </option>';
while ($row = mysql_fetch_array ($pull_proj, MYSQL_ASSOC)) {
$pulldown_proj .= "<option value=\"{$row['cds_proj_id']}\">
{$row['cds_proj_name']}</option>\n";
}
?>
<table width="550" border="0" align="center" cellpadding="10" cellspacing="0">
<tr> <td>
<form action="insert_log_entry.php" method="post">
<fieldset>
<legend><font color="#669900" face="Verdana, Arial, Helvetica,
sans-serif"><strong>Enter Project Log Entry
Below :</strong></font></legend>
<p align="center"><font size="2" face="Verdana, Arial, Helvetica,
sans-serif">Project Name :<br />
<select name="cds_proj_name">
<?php echo $pulldown_proj; ?> </select>
Sorry for the complete mess of a code above but I think Newbie is overstating my experience 🙂
Thanks in advance for your help!
Chris