0) {
echo "ERROR: quest too long (max $maxLenQuest chars; you have $excess too many.)\n";
}
$maxLenColor = 15;
$excess = strlen($_POST['favorite-color'])-$maxLenColor;
if ($excess > 0) {
echo "ERROR: favorite-color too long (max $maxLenColor chars; you have $excess too many.)\n";
}
if (preg_match("/\\p{Z}/", $_POST['favorite-color'])) {
echo "favorite-color cannot contain spaces.";
}
if (array_key_exists('is-happy',$_POST) && $_POST['is-happy']!=="yep") {
echo "INTRUDER! INTRUDER! GET AWAY! LEAVE ME ALONE!";
}
$maxLenMsg = 1000;
$excess = strlen($_POST['msg'])-$maxLenMsg;
if ($excess > 0) {
echo "ERROR: msg too long (max $maxLenMsg chars; you have $excess too many.)\n";
}
?>
It must be tough, to seek .
Oh hey, what a coincidence; I love too.
I got the message, and the message is clear:
'>
think you are happy.", "\n";
}
else {
echo " It is odd that you are happy, and you don't even know it.", "\n";
}
?>
The key/value pairs received by the form-handler
The array _POST
=
Source Code