Ver Mensaje Individual
  #2 (permalink)  
Antiguo 25/08/2010, 02:10
__SDP__
 
Fecha de Ingreso: agosto-2010
Ubicación: santiago, CHILE
Mensajes: 564
Antigüedad: 13 años, 8 meses
Puntos: 9
Respuesta: Formulario con 2 botones

Código PHP:
Ver original
  1. <?php
  2.  
  3. if($boton == "Ingresar"){
  4.     echo "aqui ingresas";
  5. }
  6.  
  7. if($boton == "Modificar"){
  8.    echo "Aqui modificas";
  9. }
  10. if(isset($boton)){
  11.     $boton = "Modificar";
  12. }else{
  13.     $boton = "Ingresar";
  14. }
  15.  
  16. ?>
  17.  
  18. <html>
  19. ...
  20. ....
  21. .....

Código HTML:
Ver original
  1. //...en el value del boton le colocas la variable q tiene el nombre
  2.  
  3. <input type="submit" name="boton" value="<?php echo $boton; ?>">