When you serialise the form data, unticked checkboxes are not sent through. The ticked checkboxes are what your script should be basing its work on, since that is also how web browsers work in a non-scripted scenario as well.