I have found out what is wrong. In my form im using checkboxes. If they are left unchecked then no value is passed in the session as there isn't one! - hence the undefined error messages. In my formhandler though you will notice im using a dynamic approach for inserting data into the database.
session_start();
require_once('common_functions.php');
$_SESSION['form1_data']=$_POST;
// build main query from form 1
$sql = "INSERT INTO qualityuser SET qualityuser_id = NULL ";
foreach ($_SESSION['form1_data'] as $col =>$val ){
if($col <> 'submit'){
$sql .=", $col = '$val' ";
}
}
mysql_query($sql, $connection) or die(mysql_error());
I need to include in the formhandler some code which says if there is a checkbox in the $_SESSION[form1data] and it is unchecked then the value = "0".
I looked up in the archives and their are references to fixing this none I could see which resemble my formhandler above
is there a better way of doing this without changing my formhandler a huge amount?