Thanks for viewing this tutorial and I hope it was easy to follow.
By popular demand, here are some basic instructions for setting up a form handler in PHP to verify user input and send an email or display an error message in case the validation fails.
This is going to call the email function (which is included in the script include at the beginning of the file) every time that textbox is tabbed or clicked away from.
Also, note the div after the textbox, that contains the failure image now as we will use that ID to change the image later.
That's because we are using the "redirect-after-POST" technique as illustrated here: This is explained in more detail in our CAPTCHA article.
It prevents the form from being resubmitted if the landing page is reloaded, and allows us to display validation error messages inline using PHP.
First we set the reg-ex and then we pass the address to it through the preg_match command.
This will process the string to match the reg-ex and output true or false.
Finally, the code includes PHP commands to re-insert any submitted values back in to the form so they don't have to be retyped in case of an error.
The important characteristics of a form handler is that it verifies that the required variables have been set, and that they have appropriate values.
The original post can be found over at David Walsh’s website. First we will make the form that will call the functions.
I think that using that this php function as well as a reg-ex and running them from an AJAX call should do the trick. Since this will be our user account creator we’ll call it
They can be a little confusing, but once you understand what it does, it’s not that bad…that is another tutorial.