Skip to content

Instantly share code, notes, and snippets.

Created September 30, 2013 13:51
Show Gist options
  • Save anonymous/6764112 to your computer and use it in GitHub Desktop.
Save anonymous/6764112 to your computer and use it in GitHub Desktop.
function checkEmpty ($item, $errormessage, &$error){
if (!empty($_POST[$item])){
$name = $_POST[$item];
}
else{
$error[] = $errormessage;
}
}
$errorstack = array();
checkEmpty('name', "Je hebt je naam niet ingevuld", $errorstack);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment