I have some relative simple questions about how it works MySQL with PHP. For beginning I have created "products" table. The table is this:
----------------------------------------------------------------------- | name | brand | type | color | price | |-------------------------------+---------+-----------+---------------- | Samsung S5230 (white | samsung | s5230 | white | 80 | | Samsung S5230 (black) | samsung | s5230 | black | 95 | | Samsung Wave 723 (black) | samsung | wave723 | black | 200 | | Apple iPhone 4G 16GB (white) | apple | iphone4g | white | 500 | | Apple iPhone 4G 32GB (white) | apple | iphone4g | white | 600 | | Apple iPhone 4G 16GB (black) | apple | iphone4g | black | 450 | | Apple iPhone 4G 32GB (black) | apple | iphone4g | black | 550 | | Apple iPhone 3GS 16GB (white) | apple | iphone3gs | white | 300 | | Apple iPhone 3GS 8GB (black) | apple | iphone3gs | black | 200 | -----------------------------------------------------------------------
I want to create a PHP script who sorts my products. I want to sort combinations in the picture below:

The first image is the default state.
The second image is when the Samsung checkbox is checked.
The third image is when the Apple checkbox is checked.
Sort by price menu has 3 options: Random, Ascending, Descending.
PRODUCT LIST HERE is the location where i want to make the MySQL selection.
Thank you for your time, regards.