[ic] Improving my search form
DB at M-and-D.com
Fri Feb 5 17:24:52 UTC 2010
I have a table with the following columns:
Code, Brand, Model, SKU
I want a form with two dropdowns... one where the Brand is selected and
another where the Model is selected. When a choice is made in the Brand
dropdown, I want only the models associated with that brand to be shown
in the Model dropdown.
What I have now (shown below) works, but the Model dropdown shows ALL
models, not only those associated with chosen option of the Brand dropdown.
Can anyone suggest a remedy? I could use a 2-page approach but that's
also a bit crude. I suspect this is fairly simple to do but I've not yet
found the answer.
<form action="[area results_sql]" method=post>
<input type=hidden name=mv_session_id value="[data session id]">
<big>First, Choose Your Machine's Brand</big><br>
SELECT distinct brand
ORDER BY brand
<option value="[sql-param brand]">[sql-param brand]
<big>Then Choose Your Machine's Model</big><br>
SELECT distinct model, brand
ORDER BY brand, model
<option value="[sql-param model]">[sql-param brand] - [sql-param model]
<input type="image" alt="Search" src="go.gif" border=0>
Any thoughts are welcome.
More information about the interchange-users