Tema: Funciones
Ver Mensaje Individual
  #1 (permalink)  
Antiguo 26/01/2013, 08:20
XD2XD2
 
Fecha de Ingreso: diciembre-2012
Mensajes: 223
Antigüedad: 11 años, 5 meses
Puntos: 2
Funciones

Hola tengo este codigo
Código PHP:
Ver original
  1. <?php
  2. if(isset($_POST['enviar'])){
  3.     function help(){
  4.     echo "Ayuda";
  5.     }
  6.  
  7.     function si($b){
  8.     echo "Tu as dicho $b";
  9.     }
  10. $_POST['comando'];
  11. }
  12. ?>
  13.  
  14. <form action="" method="post">
  15.   <input name="comando" id="comando" style="border:none; background:transparent; outline:0px;">
  16. <input name="enviar" type="submit">
  17. </form>

Al poner help(); enel input me tiene que salir Ayuda pero no me sale solo me sale si sustituyo $_POST['comando']; por help();