I asked this question earlier but couldnt find answer.. First of all sorry for my english..
I have a form include 80 checkboxes : these checkboxes are options for car ,
example for car ; Mp3 Player | ABS | Airbag | Air conditioning |
User should select his own cars options from checkboxes and post it.. The question is ? How should i store them in database? By the way user should able to update them later..
Should i use implode() and store them like
option1 , option2 , option34 , option45 , option66 , in one column
or like that
Car_ID | Options |
155 option2
155 option34
155 option45
155 option66
( How should they update them? )
or open 80 column in database and like ,
Car_ID | Option1 | Option2 | Option3 | Option4 | Option5
155 true true false false false
You should have an options table, a users table, and a user_options table that relates them. This will allow you to easily modify the options as necessary and add or remove options.
if each user can have multiple cars it should be: