Last active
October 4, 2022 14:23
-
-
Save Octagon-simon/4fb474230998be06350aca8e3a66f450 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| //begin validation | |
| if ($DemoForm->validateFields($valRules, $_POST) === true){ | |
| //process form data here | |
| }else{ | |
| //retrieve & display errors | |
| print('<script> | |
| window.addEventListener(\'load\', function(){ | |
| showErrors(' . $DemoForm->getErrors() . '); | |
| }) | |
| </script>'); | |
| } | |
| ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment