I have a html form where a user can narrow down his or her's search. For example they want to find a person based off of a number of characteristics, say hair color, eye color, body type. These are selected by a drop down menu and there are additional radio buttons to return a yes answer. For example smokes cigarettes and has pets are the radio buttons they click on if they smoke, so a yes.
So I have these five variables. Now I want to return results from a mysql database table that are narrowed down by each of the users choices on the form.
What is the best way to structure the php processing script? I'm relatively new to php and this has been driving me crazy and I can't seem to find an answer anywhere.
Is this a situation where I should nest if statements? I'm just not sure how I should tackle this problem. Any help is appreciated.