Hi,
I am building a webform for a wine database. I want to allow the user to select whichever form elements they wish. If they want to select just 1 item in the form or all items to narrow down the search, it will be ok.
My PHP
$query = 'SELECT * FROM vsommwines WHERE AND pricecat="'.$GET['pricecat'].'" AND color="'.$GET['color'].'" AND ingredient="'.$GET['ingredient'].'" AND type="'.$GET['type'].'"';
My Form Snippet
...
...
...
<input type="radio" name="pricecat" value="25to50" tabindex="9" style="position:absolute;z-index:20;left:191px;top:89px;">
<input type="radio" name="pricecat" value="O50" tabindex="10" style="position:absolute;z-index:21;left:271px;top:89px;">
<input type="radio" name="color" value="red" tabindex="11" style="position:absolute;z-index:22;left:21px;top:138px;">
<input type="radio" name="color" value="white" tabindex="12" style="position:absolute;z-index:23;left:74px;top:138px;">
...
...
...
There are many more items in the form, but if a user just chooses white, then what I want returned is all white wines no matter what the pricecat is or other fields.
My problem is that when fields are empty and submitted to the query string, nothing is returned. In this case, all fields must have a value.
How do I accomplish this?
GP