I have 4 fields from a previous page using an html form in the post
method. Everything works fine except I am trying to check to make sure the strlens
of each field are below 200. The following code always says that they are too long even though I am making sure they are way below 200.
PHP:
$hsname = trim($_POST['hsname']);
$hsstate = trim($_POST['hsstate']);
$hsemail = trim($_POST['hsemail']);
$hspassword = trim($_POST['hspassword']);
if (strlen($hsname) || strlen($hsstate) || strlen($hsemail) || strlen($hspassword) > 200){
die("Each field can only contain 200 characters"); //this is always returned even though the fields are below 200.
}
else {
echo "fields have good characters";
}