Not sure this is the right tool
My Select List is only one level deep.
It calls one field from a recordset to be used as a URL parameter in the results page.
It works fine, except that I need it to start with a Static Value such as "Select by Product"
When the viewer picks a product out of the dropdown, it submits the form and loads the next page. At present, the initially selected value, which is essentially the last record in the table, will not fire the form.
Here is my Select Code:
<select onchange="this.form.submit();" name="product" id="product" width="160" style="width: 160px">
<option value="" <?php if (!(strcmp("", $row_prods['ID']))) {echo "selected=\"selected\"";} ?>>Search by Product</option>
<?php
do {
?>
<option value="<?php echo $row_prods['ID']?>"<?php if (!(strcmp($row_prods['ID'], $row_prods['ID']))) {echo "selected=\"selected\"";} ?>><?php echo $row_prods['Name']?></option>
<?php
} while ($row_prods = mysql_fetch_assoc($prods));
$rows = mysql_num_rows($prods);
if($rows > 0) {
mysql_data_seek($prods, 0);
$row_prods = mysql_fetch_assoc($prods);
}
?>
</select>
From my understanding of Dynamic Dropdowns, I would only use it if I wanted to filter the prods table by option or some other table. That is not the case in this instance.
Actually, I've run across this same challenge countless times and have not found a resolution.
Any help would be appreciated.