Hi All,
I know this is a HTML question but it is related to PHP, I think.
I have a form embeded in a PHP script.
On the form there is a list/menu which is dynamic, i.e it calls its records from the backend SQL database.
The question is: I don't want to have a submit button, I would like to have the FORM execute when the user changes the option in the list/menu.
Below is my FORM.
<form action="booklist_filter.php" method="get" name="category" target="_self" class="bodytext" id="category">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="93%"><select name="category" class="bodytext">
<option value="" <?php if (!(strcmp("", "category"))) {echo "SELECTED";} ?>>All</option>
<?php
do {
?>
<option value="<?php echo $row_category['category_id']?>"<?php if (!(strcmp($row_category['category_id'], "category"))) {echo "SELECTED";} ?>><?php echo $row_category['category']?></option>
<?php
} while ($row_category = mysql_fetch_assoc($category));
$rows = mysql_num_rows($category);
if($rows > 0) {
mysql_data_seek($category, 0);
$row_category = mysql_fetch_assoc($category);
}
?>
</select>
<input name="" type="submit" class="bodytext" value=""></td>
<td width="7%"><div align="right"><a href="index.htm" target="_self"><img src="images/Previous.gif" alt="Back to home page" width="14" height="13" border="0"></a></div></td>
</tr>
</table>
</form>
Can anyone please advise.
Kind regards, keep safe and well.
Dereck