I have an include in my index which is a pager and list products. In an upper div to this include is the shopping cart. When I send the request data ajax to add the product the pager return the number of page,number of products and SID,but do not know how to retrieve the session to display products in the shop cart. I started the session at the beginning of the page.
Ajax code:
function agrega(codi,nropagina,num){
divContenido = document.getElementById('contenido');
ajax=objetoAjax();
ajax.open("GET", "agregacar.php?CODI="+codi+"&pag="+nropagina+"&numero="+num);
divContenido.innerHTML= '<img src="loading.gif">';
ajax.onreadystatechange=function() {
if (ajax.readyState==4) {
divContenido.innerHTML = ajax.responseText
}
}
ajax.send(null)
}
PHP response:
header("Location:paginador.php?".SID."&pag=".$PagAct."&numero=".$RegistrosAMostrar);