I have attempted to search the past posting to no avail, so I must not be searching for the right keywords. Someone must have run into this before!
What I am trying to do is to let users search a database by filling out a form, and entering as many or as little options as they desire.
On the search page I have a form that passes $product_number, $program, $customer, $prefix, $base, $suffix, $plant and $order to the second page.
The second page I have $result=mysql_query "SELECT * from allnum WHERE
((ProductNumber=$product_number) OR (ProductNumber='None')) AND
((Program=$program) OR (Program='None')) AND
... through all of the variables ending with ORDER by $order";
I changed the database do that there were no NULL values in it, and replaced them all with 'None' instead. The query that I had before did not give me any records that did not have a prefix, or a suffix etc.
How can I make this work?
Thanks for any assistance you can give.