PHP Questions Home | Register | Login
Categories
Arrays
Files
Forms
Creating PDFs
PHP Errors
Functions
Images
MySQL
Numbers
Others
Strings
Website
Unanswered

PHP Forums
Forums Index
MySQL Forum
PHP Forum
Flash/Actionscript
Javascript
Web design

More PHP
PHP Functions
Top Questions
Ask a Question
PHP Interview Questions
PHP Jobs
Ecommerce
IT Questions
Business Websites

Sponsors

sponsor ad
My Salary
PHP Developer Salary
Advertise Here

PHP Questions Forums : PHP Questions and Answers

Jump to Last Post

Multiple checkbox

By: Haripada [25-May-10 12:45AM]
1 posts
picture

Sir,
i have 6 checkbox in my entryform.php.i supposed to check more than 1 checkbox at a time. How to store multiple value in single column of database.
Latter i also retrieve value from database and EDIT the form.


http://haripada_20@rediffmail.com

Re : Multiple checkbox


Sallyjones [20-June-10 11:46AM]
12 posts
picture

If you want to store them in a single database field then you need to pick a separator between the values then implode them to join them together from your checkbox array, e.g. use @@@ as a separator if that won't occur in any of the entered text.

Then to retrieve from the database select that field and explode on the @@@ or joiner you use then simply echo out values 0 --> 5 from the array for checkbox zero to six.

Previous: Turning A String Of Text Into An Array
Next: Forms



Custom Search