I'd like to get all selected checkbox values with php. $_POST looks like this:
first_name=abc&last_name=def&checkbox=1&checkbox=2
If try to loop through the selected checkboxes using foreach
I get the following error: Invalid argument supplied for foreach()
foreach:
foreach ($_POST['checkbox'] as $data) {
// code...
}
Aucun commentaire:
Enregistrer un commentaire