estoy creando un formulario el cual no quiero usar html si no funciones el cual e creado algunas
Código PHP:
function formOpen($action = NULL, $class = "forms", $ID = NULL, $legend = NULL, $method = "post", $enctype = "multipart/form-data") {
$ID = (isset($ID)) ? ' id="'. $ID .'"' : NULL;
$legend = (isset($legend)) ? "<legend>$legend</legend>" . "\n" : NULL;
$action = (strstr($action, "http://")) ? $action : _url . $action;
$HTML = '<form'. $ID .' action="'. $action .'" method="'. $method .'" class="'. $class .'" enctype="'. $enctype .'">' . "\n\t";
$HTML .= '<fieldset>' . "\n\t\t";
$HTML .= $legend . "\n";
return $HTML;
}
function formClose() {
$HTML = "\t" . "</fieldset>" . "\n";
$HTML .= "</form>";
return $HTML;
}
<form action="" method="POST">
</form>
atraves de una arreglo que lo hago asi
Código PHP:
$login = array("action" => "", "method" => "post",);
print formOpen($login);
print formClose();
dandome este error Warning: strstr() expects parameter 1 to be string, array given in C:\xampp\htdocs\redsocial.com\system\helpers\forms .php on line 145