Hello. I will have about 50 or so radio buttons and checkboxes hard coded onto a php page.I am wanting to create a search application where the boxes and radio's they have checked will be searched in the database.

I am familiar with loops and what not and also with querying databases.

My question is what is the best way to set up the search based upon the boxes and radio buttons they have checked? Can I put all checked values in an array and run the search on the array values?I'm stumped on this.

If anyone has some suggestions or knows of a online tutorial showing how to build one of these applications I would be thankful.

Regards
Loach

    Do you mean all the necessary checked/ticked things would have to be on each record you want from the database?

    Are you searching just one table or multiple tables? If the latter you'll want to have MySQL 4.1 or higher to take advantage of Subqueries I would think.

    Surely you just need to make your SELECT statement with a loop in to add a WHERE condition for each of your checked items, if it's on one table. If it's on mulitples you'll probably need to use grouping, counting, ranges and subqueries.

    I think you'll need to be more specific to get the best answer.

      Write a Reply...