Ver Mensaje Individual
  #2 (permalink)  
Antiguo 14/02/2008, 13:16
Avatar de GatorV
GatorV
$this->role('moderador');
 
Fecha de Ingreso: mayo-2006
Ubicación: /home/ams/
Mensajes: 38.567
Antigüedad: 18 años
Puntos: 2135
Re: Procesar formulario según botón

Con el nombre, si tu tienes tu html asi:
Código HTML:
<input type="submit" name="accion" value="Accion 1" />
<input type="submit" name="accion" value="Accion 2" /> 
En tu PHP comparas asi:
Código PHP:
if( $_POST['accion'] == "Accion 1" ) {
     
// haces cosas...
} else {
     
// codigo para accion 2

Saludos.