jQuery Ajax Form Submit With PHP Processing

preview_player
Показать описание

In this tutorial we will be submitting a form using AJAX with jQuery to PHP. What you need to understand is the jQuery is shorthand for JavaScript. jQuery has a bunch of JavaScript functions that make it shorter to call in when coding. This particular tutorial is related to our other post in JavaScript Best Ajax Tutorial Simple and Easy to understand. In that lesson we coded pure JavaScript. In this lesson we are going to do it with jQuery. If you want a better understanding of the differences between jQuery and JavaScript please see “AJAX Raw Or With jQuery Whats The Difference?”

#jquery
#ajax
#php
#formprocessing

-~-~~-~~~-~~-~-
Please watch: "Web Development For Absolute Beginners | Learn to Code for Free " Free Full Course Download
-~-~~-~~~-~~-~-
Рекомендации по теме
Комментарии
Автор

Namaste :) Awesomee... really. Thnx for posting.

navpreetsingh
Автор

To be honest (not that it's not clear) but anyone could enter blank spaces into both the form fields and PHP would still process it, therefore putting trim() on the end of variable names for the form fields like val().trim(); is much better

jeremysmith
Автор

Nice, but you should indent your code: more readable

Zanka
Автор

where did you declare the result variable? and how come the php echo in index.html. I understand how jquery pass variable to processor.php but how come php passed the data back to index.html?

asifdanish
Автор

i dont see the source code in the webpage linked

bornagainselah