A
Anonymous
Guest
this is a portion of a script i'm working on to validate fields in a form
what am i doing wrong?
no matter what i do it returns as though nothing's wrong
what am i doing wrong?
no matter what i do it returns as though nothing's wrong
PHP:
<?
$errors=0;
$error="The following errors have occured while processing you input<ul>";
function isempty($var)
{
if($var=="")
{$errors=1; $error.="<li>You did not enter one or more of the required fields. Please go back and try again.</li>";}
}
$error.="</ul>";
isempty($field);
if ($errors==1) echo $error;
?>