It’s really easy to make a POST request through AJAX using JavaScript and then attach some data to send with that. This technique can be used to communicate with your server without refreshing the page and even feed it some useful information.

In this video I take you through a simple example of how this works by first setting up the request in JavaScript and then coding a simple PHP script which will do a basic manipulation of the POST variables. From there, we display the server response to the browser.

0:00​ Overview
0:35​ Creating XHR Object
0:52​ Handling the response
2:08​ Sending the request
4:46​ Verifying that it works
5:48​ Wrapping up

For your reference, check this out:

https://developer.mozilla.org/en-US/d…

Subscribe: https://www.youtube.com/c/dcode-software/featured

#javascript #ajax

Sending POST data with AJAX in JavaScript
19.05 GEEK