Page 1 of 1

Checkbox Quick Question.

Posted: Sat Jan 27, 2007 5:10 am
by dreboi
hi, quick question

Using php is it possible to have a new value generated from a set of checkboxes??

what i mean is i have 7 checkboxes, each representiong a differnt function of a mobile phone, bluetooth, camera, mp3 etc...now depending on what checkboxes are checked the phones will be placed into a category 1,2 or 3.

e.g.
i have a nokia n70 - it has bluetooth,camera ,mp3 and internet this will be a category 3
then i have a samsung c120 this only has infrared and mp3 so its category 1 etc.

its my first time on this furum and im fairly new to php, but ive been stuck on this for ages so if any one can answer my question it will be greatly apprieciated! thanks!

Posted: Sat Jan 27, 2007 5:41 am
by louie35
I suppose you have all this check boxes in a form.
If yes then after the form gets submited store the vales of the checked ones and compare it with what you have in the database for the product/s, after which you put it in the right category.

Posted: Sat Jan 27, 2007 6:17 am
by dreboi
yea i have them all in a form...infact im using dreamweaver as the interface.
but would it not be possible to sort them into categories by using 'if statements'??
ive been going through a few books and searched all over the web...and still aint sure!

Posted: Sat Jan 27, 2007 6:44 am
by louie35
dreboi wrote:yea i have them all in a form...infact im using dreamweaver as the interface.
but would it not be possible to sort them into categories by using 'if statements'??
ive been going through a few books and searched all over the web...and still aint sure!
That's what I meant saying "compare"