-
-
Save OrangeTux/6764343 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function checkEmpty ($item, $errormessage, &$error){ | |
if (!empty($_POST[$item])){ | |
$name = $_POST[$item]; | |
} | |
else{ | |
$error[] = $errormessage; | |
} | |
} | |
# Initialize empty array. | |
$errorstack = array(); | |
# Call checkEmpty with as 3th parameter $errorstack. | |
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