Custom Search Based upon User selection with multiple select

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
bhanu507
Forum Newbie
Posts: 1
Joined: Wed Dec 29, 2010 3:24 am

Custom Search Based upon User selection with multiple select

Post by bhanu507 »

Hello,

I had 8 select boxes(dropdowns) in a form. Its like a search kind of implementation in the website. I don't know what the user selects, he may choose different select boxes, any number of select boxes.

So, based upon the user selection, I need to generate the data in another form. The data fields to be generated would be almost same.

So, How would I know what the user selection is and how many select boxes has been selected and how could I generate different data based upon selected boxes.

I had to make a small note abt this, that the data generation fields may change for some of the user select combinations, but most of the result fields would be same.

so, can you please help me out, how to do, how to make different combination data generations, because, i had 8 fields, i had to make 8! combinations, that would result in a big code.

I will try to explain you with an example kind of thing...like for suppose in a form , I had some select dropdown boxes. lets say...

1) cars

2) Bykes

3) Trucks

4)Engine capacity

and if the user selects cars, it will show up different cars from wide range of car manufacturing companies, and then the user will select the car, later when user submits the forms, it will be redirected to another form where, actually, it will show up the car price, engine capacity, mileage, type of car..etc..so, if the user selects cars and engine capacity at a same time, then it will return another table with different fields in it, hope you got me point

In this way I want to generate data with different combinations like, cars and engine capacity, cars & bykes&enginecapacity, trucks and enginecapacity, and trucks and cars only,likewise, we can form 4! combination, and for this 4! combinations, we need to generate data with different fields

and in my case, it was 8 fields....so think how the code would be and what would be the number of combinations

hey, i want to make a note with you, only 3 out of 8 fields are dependent on each other, and the user may select one field mandatorily from those 3 fields, and he may or may not select a field from remaning 5 fields. if he selects, both selections , we need to generate the data, otherwise, generate another data......
Post Reply