I am getting an “Undefined index” error when submitting a form with an un-checked checkbox. Is there any other way besides running an “isset” or “empty” check on each individual posted value?
I have looked at this Question and am having trouble believing that this is the only solution.
Below is some example code:
EDIT: please not that these are not the actual names of the tables columns; they are named uniquely (like “postAddress, displayPhone, student, etc.)
You could write a function that checks whether a checkbox was checked:
Now call that function in your query like this: