From the course: Ajax with PHP: Add Dynamic Content to Websites

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Create the form

Create the form

From the course: Ajax with PHP: Add Dynamic Content to Websites

Start my 1-month free trial

Create the form

- [Instructor] In this chapter, we will build a form which uses Ajax to send its data to a remote server asynchronously. The form that we're going to create is going to submit the length, width, and height to the server and then get back the total volume as a response. Now, I'm very well aware that we could just use plain old client-side JavaScript to perform this task. After all, it's just math. We're multiplying length times width times height, and JavaScript is perfectly capable of doing that without using Ajax to send a request to a remote server. But I want to do is create a really simple form that can serve as a stand-in for any kind of form that might submit its request asynchronously. For example, you might create a user log in form that submits the username and the password in order to log in a user. Or you might have a contact us or a feedback form, where we just want to pop up a feedback form in an overlay and allow the user to type in their feedback and hit submit and have…

Contents