.error{
font-weight:bold;
color:#FF0000;
}
class.error.php
countErrors() > 0){
foreach ($errors as $err){
echo "$err";
}
}
}
function countErrors(){
global $errors;
return count($errors);
}
}
?>
test_error.php
setError("Name is not valid");
}
if($e->countErrors() == 0){
//Since there aren't any errors process the form
header("location: success.php");
die();
}
}
?>
showErrors(); ?>