From the course: Validating and Processing Forms with JavaScript and PHP
Unlock this course with a free trial
Join today to access over 22,400 courses taught by industry experts.
Processing form data with AJAX
From the course: Validating and Processing Forms with JavaScript and PHP
Processing form data with AJAX
You probably haven't noticed that when we submit this form, the entire page has to reload. In this form, it happens so fast that you can't really tell. If this were part of a bigger page you would definitely notice the reload. We can have the process for the PHP file do it's work in the background without having to reload the page. That's what AJAX is for. AJAX is a complicated subject by itself, so if you're interested in learning more about AJAX, make sure you check out my other course, JavaScript and AJAX. I'm going to use JQuery's version of AJAX because it's simpler and more backwards compatible. One problem with AJAX and JavaScript is that they weren't designed to allow you to send files. So. if you've been following along with the project, you may notice this version of the exercise document is a little bit different. Its pretty much the one without the file uploading code. In the previous movie we removed the HTML5 validation. I've added the pattern and the required attributes…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.