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!
Everah | Please use code tags when posting code in the forums.
hi every1...
i would like to know how to store multiple checkbox values in the database using php n mysql and how to retrieve the same value back from the database?
here is the code...if some one can help me..it would b gr8..
If you are storing the checkbox value as an array in a single field then you would need to serialize the array variable in order to store it and unserialize it to retrieve it from the database.
Otherwise, if you will be storing the checkbox values in seperate fields then you would need to loop the array and extract each value from the array.
thanks for replying . but i dunt know how to do the serialize code...pls if u dunt mind,can u pls wrtie the php code for serialization and retriivng the array values?plsss help me
onion2k is right - plus you will learn more by doing it yourself. If you get stuck with anything just post back in this forum and i'm sure you well get good guidance.
amrita2084 wrote:thanks for replying . but i dunt know how to do the serialize code...pls if u dunt mind,can u pls wrtie the php code for serialization and retriivng the array values?plsss help me
When you have a question like this, the way to get an answer is to use a search engine. aceconcepts gave you the clue by mentioning serialize and unserialize. Try googling with key words php serialize unserialize.