Tema: Paginacion
Ver Mensaje Individual
  #4 (permalink)  
Antiguo 24/11/2011, 17:24
loluchis
 
Fecha de Ingreso: octubre-2011
Mensajes: 37
Antigüedad: 12 años, 6 meses
Puntos: 9
Respuesta: Paginacion

Código PHP:
Ver original
  1.  
  2. if(!isset($_SESSION['where']))
  3.     $_SESSION['where'] = $_POST['where'];
  4.  
  5. echo "select * from table where {$_SESSION['where']}";

si no existe la variable de sesion la crea con los datos del post, a partir de ahi siempre usas la de sesion y siempre y cuando hayas iniciado la sesion con session_start tendras ese valor a mano para usarlo donde quieras

aqui mas info: http://www.php.net/manual/es/book.session.php