You could name them as: <input type="checkbox" name="choice[]" value="1"> <input type="checkbox" name="choice[]" value="2"> etc...
Then $_POST['choice'] will be an array of the boxes chosen. $list = implode(',',$_POST['choice']); will give you a comma separated list of all items chosen. ---John Holmes... ----- Original Message ----- From: "Cesar Aracena" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, August 15, 2003 2:25 PM Subject: [PHP] Checkboxes Hi all, I am wondering what would be the best way to handle checkboxes. I am making a site that will display several items in a 20-items-per-page format and each item will have a checkbox next to it for the user to select them. Now, what I need to do is to record the items selected by the user when clicking the "Next button" into a MySQL table. Should I name all the checkboxes the same, using the item IDs as values and then use an array to see which ones where selected or maybe another thing? Thanks in advanced, Cesar Aracena <http://www.icaam.com.ar> www.icaam.com.ar Note: The information inside this message and also in the attached files might be confidential. If you are not the desired receptor or the person responsible of delivering the message, we notify you that it's copy, distribution, keep or illegal use of the information it has it's prohibited. Therefore we ask you to notify the sender by replying this message immediately and then delete it from your computer. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php