searching multiple fields
I have a form with drop menu's where i'd like to search a table for 3 things.
-employee
-location
-date
here is my code:
Code:
$query = "SELECT * FROM dar WHERE date='date' AND employee='$employee' AND location='$location'";
It only works if you select a value for all 3 drop menu's.
My question: How can i make the SELECT query still work if the user does not select a value for all of the drop menu's on the form? IE: I only pick a date and hit submit...
Thanks for the help!
Cory