I want to build an algorithm to search and filter data from my database. I have three dropdown lists on my page:
-
Categories
-
Products
-
Brands
MySQL database table has fields:
id, title, description, category, product, brand
My goal is to search according to selected items from my dropdown lists. What is the best way to do it? Should I send the form results into one function, compute it there and send into the view?
Could you show me some ways to connect these 3 parameters?
I’m coding it in PHP with CodeIgniter.
This is the generic approach