Ver Mensaje Individual
  #2 (permalink)  
Antiguo 21/09/2011, 11:10
jjjericu
 
Fecha de Ingreso: agosto-2011
Ubicación: DF
Mensajes: 44
Antigüedad: 12 años, 8 meses
Puntos: 10
Respuesta: error en strstr

probe tu codigo agregandole una linea y poniendole un valor y jala muy bien

Código PHP:
Ver original
  1. <?
  2.  
  3. function formOpen($action = NULL, $class = "forms", $ID = NULL, $legend = "hola", $method = "post", $enctype = "multipart/form-data") {    
  4.     $ID     = (isset($ID))     ? ' id="'. $ID .'"'                            : NULL;
  5.     $legend = (isset($legend)) ? "<legend>$legend</legend>" . "\n" : NULL;
  6.     $action = (strstr($action, "http://")) ? $action : _url . $action;
  7.      
  8.     $HTML  = '<form'. $ID .' action="'. $action .'" method="'. $method .'" class="'. $class .'" enctype="'. $enctype .'">' . "\n\t";
  9.     $HTML .= '<fieldset>' . "\n\t\t";
  10.     $HTML .= $legend . "\n";
  11.     $HTML .= '<input type="submit" value="boton"/>';            
  12.  
  13.     return $HTML;
  14. }
  15.  
  16.  
  17. function formClose() {
  18.     $HTML  = "\t" . "</fieldset>" . "\n";
  19.     $HTML .= "</form>";        
  20.      
  21.     return $HTML;
  22. }  
  23.  
  24. $login = array("action" => "ard.php", "method" => "post",);
  25. echo formOpen($login);
  26.  
  27. echo formClose();
  28.  
  29.  
  30. ?>