This similar question or just might help your problem show how to get GET and POST page data.
How to get GET and POST variables using jQuery?
Otherwise, sending data to the server without sending or loading the page is possible using jQuery.ajax()
So you make a call like: jQuery.ajax('somewebpage.php?someVariable=someValue&someOtherVariable=someOtherValue');
and in a PHP file, you store this data in a session or database. And on the next page, download this data.
source share