Filter using PHP and AJAX

Hello, Over the last days I have been trying to create a simple filter method for some products …

It goes like this : I can have 3 types of products

Shirt
T-shirt
pants

they all come in 3 sizes … Small Medium and Large…

I have 2 HTML SELECT elements … one from which I can select the type of product … and one from which I select the size … by default both of the values of the select are set to ALL …

If I choose a size, for example Medium , I want to see all of the products of medium size … after that if I select a type of product I want to see for example just the pants of the Medium size … if I change the select for size … I want to see the same product just the new size I chosen …

I m new to all this I dont know where to start … I keep my products in an array in a separate file

Any advices hints or link to where I can learn what I need are welcomed ! THanks guys!

Have a look for a few threads talking about a submenu problem a week or two ago, they’re very similar and would show you how to take the selected value of a drop-down and use it to call some PHP to query the database and then set the results into a second drop-down.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.