I am getting Notice: Undefined variable: myvariable when I post my form with the checkbox unchecked.
I need to check if the checkbox is not checked.
How would I do this?
Create hidden field before checkbox with same name on html form.
<input type="hidden" value="0" name="check"/>
<input type="checkbox" value="1" name="check"/>
In this case the value $_POST['check'] is defined always