Checkbox Quick Question.

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
dreboi
Forum Newbie
Posts: 2
Joined: Sat Jan 27, 2007 4:53 am

Checkbox Quick Question.

Post 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!
User avatar
louie35
Forum Contributor
Posts: 144
Joined: Fri Jan 26, 2007 8:40 am
Location: Dublin
Contact:

Post 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.
dreboi
Forum Newbie
Posts: 2
Joined: Sat Jan 27, 2007 4:53 am

Post 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!
User avatar
louie35
Forum Contributor
Posts: 144
Joined: Fri Jan 26, 2007 8:40 am
Location: Dublin
Contact:

Post 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"
Post Reply