The purpose is to have a checkbox, that if clicked, will send via post where I will update the db. The user can check back and forth to set or unset active status.
This works perfectly:
<form name='form".$value['id']."' action='./filter_edit.php' method='post'><input type='checkbox' name='checkbox[".$value['id']."]' value='".$newActive."' onclick='document.form".$value['id'].".submit();' /></form>
However, using the code above, the box never appears checked.
With the below code, once the field is set to active where the box will be checked, clicking to uncheck the box does submit but sends no post variables.
<form name='form".$value['id']."' action='./filter_edit.php' method='post'><input type='checkbox' name='checkbox[".$value['id']."]' value='".$newActive."'";
if($value['active'] == 1)
echo " checked='checked'";
echo" onclick='document.form".$value['id'].".submit();' /></form>