Page 1 of 1
Storing form array data to Mysql using php
Posted: Thu Feb 02, 2006 2:27 am
by osemollie
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.
Posted: Thu Feb 02, 2006 2:40 am
by feyd
Posted: Thu Feb 02, 2006 3:24 am
by jayshields
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:
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
}