how to store multiple checkbox value into database
Posted: Wed Feb 16, 2005 1:37 pm
I m stucking with the multiple checkbox that want to store these value into the database.
In my form , that allow the user to select more than one type of languages their like. There are four checkbox
1.)English
2.)France
3.)Mandarin
4.)Others.
In this case, user may select more than one language.So how should i store this value into the database?
my idea is use implode to get the variables into a string, then input that into the database, when you retrieve it you can use explode to get them all back again. Could it be done in this way.
If i need to query from the database which select to show all user that has select only english , how can i make it?
Could anyone give some idea for me.Thank you!
In my form , that allow the user to select more than one type of languages their like. There are four checkbox
1.)English
2.)France
3.)Mandarin
4.)Others.
In this case, user may select more than one language.So how should i store this value into the database?
my idea is use implode to get the variables into a string, then input that into the database, when you retrieve it you can use explode to get them all back again. Could it be done in this way.
If i need to query from the database which select to show all user that has select only english , how can i make it?
Could anyone give some idea for me.Thank you!