Hi,
I have a form that lest a user update their details, and it has some checkboxes in it. The problem is that the following code producdes an undefined index on all the checkboxes in the script when they are not filled in:
$query = "UPDATE suppliers SET first_name='$first_name', last_name='$last_name', password='$password', address_line1='$address_line1', address_line2='$address_line2', town='$town' , county='$county', postcode='$postcode', daytime_phone='$daytime_phone', mobile_phone='$mobile_phone', email_address='$email_address', test1='$test1', test2='$test2', test3='$test3'";
$result=mysql_query($query) or die("Could not insert data.".mysql_error());
//$result represents the status of the operation true if it worked false if it failed
if($result){
print "Your details have been sucesfully updated. You can go back to the <a href=suppliers.php>index</a> page now.";
}else{
print "Could not update data.";
}
What condition would I have to use in this query?
Thanks,
G