Question:

How to use ajax validation for forms in php?

by  |  earlier

0 LIKES UnLike

I need to know with codes or example how can ajax be used in php for form validations, slide shows etc.

 Tags:

   Report

1 ANSWERS


  1. Not very good answers above: these are all spams.  Report them.

    Your question is multiple and too complex to explain here: there is a big difference between validating a form and making a slide show!!!

    Most of the time, form validation can be done in the javascript that has already be downloaded: use

    <form ... onsubmit = validate(theForm) >

    where validate() is a JS routine that checks the fields.  When finding a mistake, returns to the form with the cursor on the incorrect field.

    There is no need for AJAX in that part!

    You COULD, if necessary, send the form to Php, as an AJAX request, vaslidate the form in Php, then return, OR to the form if there is an error, OR to the next step in your process ("Thank you for the form!")

    If you are using Php, I stongly recommend to use SAJAX (not "ajax").  Google it and download it for free.  It is a form of HTTPRequest that works extremely well with Php.

Question Stats

Latest activity: earlier.
This question has 1 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.