With the following AJAX call I set pagination for a webpage. It works.
In my PHP file already have:
$page= $_POST[page];
AJAX call:
function pg2(page) {
pag.ajax({
type: "POST",
url: "file.php",
data: { page: page },
success: function(ccc) {
pag("#search_results").html(ccc);
}
});
}
I also need to pass id
from the URL.
http://website.com/title/?id=2 **//I need to pass id in php file and echo it out.
How can I do that? many thanks.
$_GET[]
or$_REQUEST[]
;$_GET['id']
to retrieve it.