Hello all, I am a little stuck with the initial stage of a small project.
I'm hoping that you maybe able to point me in the right direction or give me some thoughts on how I best could accomplish my goals with PHP.
In our database we have 10 columns of different kinds of apples. Our rows are arranged by weights, 1lb to tons and each cell has a price.
Something like this
Weight Apple Orange Lime Banana Alfalfa Straw
1lb $0.22 $0.23 $0.46 $0.22 $1.05 $1.06
2.2k $0.22 $0.23 $0.46 $0.22 $1.05 $1.06
Gross $22.00 $23.00 $46.00 $22.00 $105.00 $106.00
Bushel na na na na $6.22 $6.24
Bale na na na na $4.89 $4.90
10lbs $2.20 $2.30 $4.60 $2.20 $10.50 $10.60
22k $2.20 $2.30 $4.60 $2.20 $10.50 $10.60
50lbs $11.00 $11.50 $23.00 $11.00 $52.50 $53.00
110k $11.00 $11.50 $23.00 $11.00 $52.50 $53.00
I am going to build a page with 10 different Check boxes (1 for each apple (fruit type)). Then I am going to have a multi-select with the different weight types.
The goal:
The buyers will be able to check different types of apples then select 1 or more different weight types and compare them side by side in a table that is generated on submit.
Where I am lost at is how do I, do these multiple selects and get the data into a table which is based off of their choices?
I have coded other pages to get single data points ie "Select apples from fruits where weight =1lb" and I have even done the multi-select that gets all the weights "Select apples from fruits where weight=$t" then loop through the results in rows for the table. I just have no good idea on how to select results for each fruit and weight at the same time.. hope this makes since.
Any help is appreciated.