Ver Mensaje Individual
  #2 (permalink)  
Antiguo 22/02/2014, 12:55
__SDP__
 
Fecha de Ingreso: agosto-2010
Ubicación: santiago, CHILE
Mensajes: 564
Antigüedad: 13 años, 8 meses
Puntos: 9
Respuesta: Obtener resultados de un form

Código PHP:
Ver original
  1. <?php
  2. //isset es para saber si la variable esta seteada
  3. //y faltaba el nombre del boton "go"
  4. if(isset($_POST['go'])){
  5. ?>
  6.       <input type="text" value="<?=$row1;?>" readonly /><br>
  7.       <input type="text" value="<?=$row2;?>" readonly /><br>
  8.       <input type="text" value="<?=$row3;?>" readonly />
  9. <?php
  10. }else{
  11. ?>
  12.  
  13.       <form name="formmailer" method="post" action="index.php">
  14.         <input type="text" name="text" value="<?=$text;?>" onfocus="if(this.value=="<?=$text;?>") this.value=''" onblur="if(this.value=='') this.value="<?=$text;?>""  class="input_text" autocomplete="off" />
  15.         <input type="submit" id="go" name="go" class="button_generate">Generar</button>
  16.       </form>
  17.  
  18. <?php
  19. }