Hello. I'm working on a search page for a website with member accounts and such, basically a personals/dating website. People can have things on their page such as whether they smoke (never, rarely, or often), whether they drink alcohol (never, rarely, or often), their religion, et cetera. For searching through user profiles, you select options with HTML checkboxes. Users may search by selecting various checkboxes and such for different things, so any final search query will have to be composed of several different options.
Example:
- Smokes: rarely, often
- Drinks: never, rarely, often
- Religion: Buddhist, Hindu, Christian, Jewish
A person searching might select the checkboxes for multiple items in each section, then his Submit.
How would I write the PHP search page which combines the various options to create a MySQL query?
Thanks.
|