How can I Store form array data (eg checkboxes) to Mysql using php? And how can i display the results of these array information thereafter?
Thanks.
Storing form array data to Mysql using php
Moderator: General Moderators
- jayshields
- DevNet Resident
- Posts: 1912
- Joined: Mon Aug 22, 2005 12:11 pm
- Location: Leeds/Manchester, England
Name your checkboxes checkbox[] and they will automatically be passed in an array to PHP.
Then you can do something like this to parse the results:
Then you can do something like this to parse the results:
Code: Select all
foreach($_POST['checkbox'] as $key => $value) {
//If you wanna show the results
echo "$value<br />\n";
//It's easy to do something with the results now you've got access to them, I can't demonstrate using MySQL with them because you're not specific enough
}