I’ll post up an example or something…once I get some more free time…
but understanding the ‘concept’ also helps…
The quick -n- dirty of it is…
you have your form/page (code)…and somewhere/somehow in this page you call a javascript/AJAX function.
This evebt actually calls an external PHP file… that (for example) does the database work or checks some value against another value in a db… (or whatever)… and then returns some data, a response…etc…
Your initial AJAX call that loads this PHP script… -also- handles the return/response… and handles things as coded:
Fail:
update some DIV/container DOM element with some text
Success:
Show success… or display the returned data to the page using javascript/jQuery (front end) as you see fit.