Ver Mensaje Individual
  #2 (permalink)  
Antiguo 13/10/2005, 21:05
Avatar de yoseman
yoseman
 
Fecha de Ingreso: diciembre-2003
Ubicación: Alicante (Spain)
Mensajes: 471
Antigüedad: 20 años, 4 meses
Puntos: 5
No hace falta que pases nada por query string, simplemente define la variable antes del include y úsala tal cual en el script incluido

Código PHP:
$tipo=$_GET['tipo'];
// AL LLAMAR A mostrar.php, YA RECIBE LA VARIABLE $tipo
// DE NO SER OBVIAMENTE QUE QUIERAS ACCEDER A ELLA DESDE UNA FUNCIÓN
// EN CUYO CASO LA HABRÍAS DE DEFINIR EN LA CABECERA DE LA FUNCIÓN 
// COMO global $tipo; o pasarla como parámetro
include('mostrar.php'); 
Ni siquiera sería necesario definir $tipo=$_GET['tipo'];puedes usar $_GET['tipo'] en mostrar.php


sALU2 ;)
__________________
[+]
[+]

Última edición por yoseman; 13/10/2005 a las 21:15