Ver Mensaje Individual
  #4 (permalink)  
Antiguo 04/09/2011, 23:38
Avatar de Naahuel
Naahuel
 
Fecha de Ingreso: marzo-2011
Ubicación: localhost
Mensajes: 796
Antigüedad: 13 años, 1 mes
Puntos: 192
Respuesta: Detectar accion en otro archivo

Es decir. Dentro de pepe.php tendríamos:

Código PHP:
Ver original
  1. <?php
  2. $variable = $_GET['variable'];
  3. ?>
  4.  
  5. <form action="pepe.php" method="GET">
  6.   <input type="text" id="variable" name="variable" />
  7.   <input type="submit" />
  8. </form>

??

¿O sea que el mismo archivo que contiene el formulario es el que lo procesa? Y a la vez, tenemos un segundo archivo llamado mario.php que también necesita esos datos...

Yo digo, ¿por qué no hacés todo en un sólo archivo? No entiendo la necesidad de dos.

Aún así, yo usaría sesiones. Es decir, que pepe.php tenga:
Código PHP:
Ver original
  1. <?php
  2. $variable = $_GET['variable'];
  3. $_SESSION['variable'] = $variable;
  4. ?>

Y en mario.php, recojo el valor con:
Código PHP:
Ver original
  1. <?php
  2. $variable = $_SESSION['variable'] ;
  3. ?>
__________________
nahueljose.com.ar