Validating checkboxes with php
Of course, if there’s no errors – the form does a hard .submit() – to the same processing page and handled accordingly.
Of course, we have add our styling so our field will look like our screenshots above. Again, the styles are real basic and you probably want to do better in your own forms. We’ve combined best of both worlds: server side and client side validation in one solution (thanks to Ajax). If a field validation rule has to change – we only need to change it in one place: the server code.
Also, our users will benefit from our friendly form – and the way it gracefully tells them when they’ve missed a field and such.
Search for validating checkboxes with php:
The rest of the code is simply handled as if it’s regular server side processing.