Hello,
I'm having some difficulty getting a dynamic pull dow to display correctly. The server is a linux server running appache, the version of php is 4.2.3.
The pull down is supposed to pull info from a mysql database and display the different options available for the merchandise. It pulls the information, but displays it all on one line in the pull down, just as if it was coded in HTML as follows:
<select name="select">
<option>55.566.57</option>
</select>
I have it coded before the form that the pull down is in as follows:
// Get Metal Type.
if (($POST['Metal'] == 'exists') && (COUNT($POST['exists']) > 0)) {
$query .= "'" . escape_data($POST['Metal']) . "')";
$result = @ ($query); // Run the query
$m = explode ('^ ', ($POST['exists']));
}
}
The code in the pull down:
<select name="exists">
<option><font face="Arial, Helvetica, sans-serif" size="2">Make Metal
Type Selection Here</font></option>
<?php // Retrieve Metal Types and add to the pull down menu.
$query = "SELECT Metal from Products Where ItemNumber = '$in'";
$result = @ ($query);
while ($row = mysql_fetch_array ($result, MYSQL_ASSOC)) {
echo "<option value=\"{$row['Metal_ID']}\">{$row['Metal']}</option>\n";
}
?>
</select>
I know that I'm missing something to display this correctly, I just don't know what... please help.
Thanks
T