You can send data to the callback script, specified in the URL, by including values in the jQuery.ajax data
setting. Depending on what type of request you're making, this data will either be included in the $_GET
or $_POST
global variables. For example, to POST data to your callback script, you could do:
$.ajax({
url: 'content/get.php',
type: 'post', // performing a POST request
data : {
data1 : 'value' // will be accessible in $_POST['data1']
},
dataType: 'json',
success: function(data)
{
// etc...
}
});
For more information, please read up on the jQuery.ajax function's documentation at https://api.jquery.com/jQuery.ajax/