I have a form that dynamically generates checkboxes. Right now the name of each checkbox is different. Does anyone know how I can import the names of the form into php if they are checked. I am mostly familiar with $_GET and $_POST but I can't use those if I don't know the names of the input fields.
Thanks in advance.
Importing checkboxes
Moderator: General Moderators
- jaoudestudios
- DevNet Resident
- Posts: 1483
- Joined: Wed Jun 18, 2008 8:32 am
- Location: Surrey
Re: Importing checkboxes
Use a loop to grab the auto generated post names and post values.
Code: Select all
<?php
foeach ($_POST as $k=>$v) {
$$post = $k;
$post = $v;
}
?>