Jquery mobile submit form php - AJAX form submission using jQuery and PHP (part 3)

21st of December 2011 17

AJAX form submission using jQuery and PHP (part 3)

Submit your forms without page refresh using jQuery’s AJAX functions. This tutorial shows how to add client side validation and form submission by AJAX. We will also re-validate the submitted form on the server using a PHP script and return a success or error message to the user. Get it all done without ever having to reload or refresh the page. In this lesson we finish up our client side validation and AJAX submit logic. In the next lesson we’ll write our PHP script and finish up the application.

Share it!

Was it good for you to?


Support for the site!

No sponsors at the moment.

17 great comment(s) for this post

  1. wormracer08 10:42 pm 21/12 of 2011

    @bibhutiodisha The file download link is in the description of the first video.

  2. bibhutiodisha 10:44 pm 21/12 of 2011

    Hi, Thanks, this is nice code. From my ajax code is not working. I did not find the error. Could you please help me. When I call the ajax function this is not working. Please send me the file.

  3. WatchTheShark 11:13 pm 21/12 of 2011

    @wormracer08 Gotcha. Very cool. I have a contact form on my site but this one is WAY better. When I’m done with it, I’ll send you the link to get your feedback.

    Thanks for doing these videos! Much appreciated.

  4. wormracer08 11:20 pm 21/12 of 2011

    @WatchTheShark Thanks. I wrote that code, it’s just a regular expression to match what could be a valid email.

  5. WatchTheShark 11:53 pm 21/12 of 2011

    Where did you find the code for the email.match line that follows the 2nd if statement?

    By the way, the honeypot trick is pretty cool. I haven’t seen that one before.

  6. wormracer08 12:09 am 22/12 of 2011

    @VariousCraft I’d be happy to take a look at your code. Send me a message with your code brother. Or, check out the demo and compare your code there. The link is in the first vid description.

  7. VariousCraft 12:18 am 22/12 of 2011

    Hey dude, thanks for the awesome video. I am having a little issue though which I really hope you can help. Basically the validation works once I click the button on my form and all errors show up, however if i was to enter a name for example and re-click the submit button nothing happens, the old errors are still displayed from the first click. In your video it all changed dynamically. I have gone over your videos countless times to see if there’s anything I missed to no joy. Please Help.

  8. wormracer08 12:31 am 22/12 of 2011

    @VictorGalaxy It is just about done, should have it out by tomorrow.

  9. VictorGalaxy 12:34 am 22/12 of 2011

    It would be nice if you could extend this tutorial to include how to send user info. to my email.
    Thanks. Nice tutorial :)

  10. wormracer08 12:54 am 22/12 of 2011

    @DreamerWolf0 Thanks so much man. It’s pretty simple to send the email, I could extend this tutorial if you like and show how I would do it.

  11. wormracer08 12:58 am 22/12 of 2011

    @mamutso thanks! Yup, that is the way I would do that.

  12. mamutso 1:16 am 22/12 of 2011

    Nice tutorial and simple.
    Would be nice if the errors would be next to each text inputs.
    How can we do that we should use span i guess with unique span id?

  13. wormracer08 2:01 am 22/12 of 2011

    @Mr047blz Thanks glad you liked it.

  14. Mr047blz 2:38 am 22/12 of 2011

    Nine Work {wormracer08} ;)

  15. wormracer08 2:48 am 22/12 of 2011

    @WalnutPro Thanks alot! I’m working on some more tuts so stayed tuned.

  16. WalnutPro 3:40 am 22/12 of 2011

    Love it! The honeypot is brilliant. Great job on the vid ! I also checked out your site nice work. I hope you do more vids as your teaching style is easy to follow. Thank you gotmburl.

  17. MrShawnlloyd 3:43 am 22/12 of 2011

    this is actually starting to make sense to me now…great job


Your opinion matters. Add it below.

Tip: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Recent comments


Copyright jqueryui.info since 2010. All rights reserved. Design and the Absolute Theme by Tommie Hansen.