Ver Mensaje Individual
  #6 (permalink)  
Antiguo 02/04/2011, 16:29
Galis
 
Fecha de Ingreso: abril-2011
Mensajes: 12
Antigüedad: 13 años, 11 meses
Puntos: 0
Respuesta: ¿Como saber si tengo parametros o no en la URL?

Cita:
Iniciado por almagropaco_ Ver Mensaje
Código PHP:
Ver original
  1. <?php if(isset($_GET[cat])){ //Condicional si es que esta definida la variable cat
  2.  
  3. if($_GET["cat"] == "Amistad"){
  4. $paging->agregarConsulta("Select * from visible where FK_CATEGORIA like 'Amist%' order by ID_POST_VISIBLE desc");
  5. }
  6. elseif($_GET["cat"] == "Amor"){
  7. $paging->agregarConsulta("Select * from visible where FK_CATEGORIA like 'Amo%' order by ID_POST_VISIBLE desc");
  8. }
  9. elseif($_GET["cat"] == "Dinero"){
  10. $paging->agregarConsulta("Select * from visible where FK_CATEGORIA like 'Diner%' order by ID_POST_VISIBLE desc");
  11. }
  12.  
  13. }else{echo"No se definio la variable cat";}
  14. ?>
Buenisimo! Muchas gracias a todos :D queda resulto.