client-side), we can still find a way to communicate between them.
Method 1: Using an AJAX call
needing to refresh the page. In this example, we’ll use jQuery to simplify our AJAX call. If you don’t have
jQuery included in your project, add the following line in your HTML’s head section:
PHP script called process.php. Here is how you can do it:
$_POST superglobal array like this:
Method 2: Using a form and a hidden input field
create an HTML form with a hidden input field:
and trigger this function when the form gets submitted:
$_POST superglobal array as shown in the previous method.