Hi,
I'm creating a multipage form using sessions. You submit text info on the first page, session is started on the second page and i grab the information which is succesfully output on the second page. Second page has a huge amount of checkboxes on it.
You then move to the third page, session is started again and the first 10 fields of text are picked up as a session variable.
The problem is: When i try to pick up values for the checkboxes it works fine if they are checked, but unchecked i get the following error message:
Notice: Undefined index: c1 in C:\Program Files\Apache Group\Apache2\htdocs\mysite\myform3.php on line 15
this is the code for a couple of checkboxes on page 2:
<input name="c1" type="checkbox" id="c1" value="true">
<input name="c2" type="checkbox" id="c2" value="true">
this is the php used to pick up the checkbox value:
$c1 = $_POST['c1'];
$_SESSION['c1'] = $c1;
$c2 = $_POST['c2'];
$_SESSION['c2'] = $c2;
I think it may be a problem with the way i have defined the checkboxes (e.g. not in an array???).
Any help would be greatly appreciated, i've been working on this for ages and its starting to p*ss me right off!
Cheers
Tom