php - A way to get a parameter from the URL -


i have issue i'm trying solve.

i have page lista.php in load page (which refreshes every x seconds) named pagination.php

i use script:

function loadcontent() {     $('#lista').load('pagination.php'); } $(document).ready(function(){     loadcontent(); //load contentent when page loads     setinterval('loadcontent()',30000); //schedule refresh }); 

well, there url:

lista.php?id=3 

i need pagination.php grab id, won't work.. pagination.php inside lista.php... how can solve it? tried method..

any suggestion please? thanks.

add parameter url, e.g.:

function loadcontent() {     var id = ... <== assign id here     $('#lista').load('pagination.php?id=' + id); } $(document).ready(function(){     loadcontent(); //load contentent when page loads     setinterval('loadcontent()',30000); //schedule refresh }); 

Comments