Page 1 of 1

Importing checkboxes

Posted: Fri Aug 01, 2008 1:32 pm
by cczernia
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.

Re: Importing checkboxes

Posted: Fri Aug 01, 2008 1:38 pm
by jaoudestudios
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;
}
?>