So I have a form which is updating textfields fine but the checkbox values are not:
here is my textfield example:
<td><strong>What is it?</strong></td>
<td width="39%"><textarea name="what_is_it" rows = "5" cols="40">' . $row['what_is_it'] . '</textarea></td>
<td> </td>
here is the checkbox example
<td><p> Independent, self-managing organisation, incorporated </p></td>
<td><input type="checkbox" name="independent" value="1"';
if ($row['independent'] == 1) {echo 'checked';} echo '>
</td>
and here is a snapshot of the update code for each of these fields
<?php
$quality_name = $row['quality_name'];
if (isset($_POST['submit']) && $_POST['submit'] == 'update')
{
//this is the update part
$sql = "UPDATE quality_info SET
what_is_it= '".$_POST['what_is_it']."',
independent= '".$_POST['independent']."'
WHERE quality_id = '".$row['quality_id']."'
";
}
$result = mysql_query($sql) or die(mysql_error());
?>
like i said the textfield updates fine but the checkbox results in a undefined index error
thx in advance