That's my code
$devmsg = $db->real_escape_string($_POST['devmsg']);
if(strlen($devmsg) <= 200) {
do something
} else {
do some other thing
}
When I add to the message some special chars such as "(" "[" "." "{" and so on the strlen() counts wrong.. If my message is ~160-180 characters long and there are specials chars in it , the if operator just returns false and goes to else.. I thought the problem's here $db->real_escape_string
and then removed it but still got the same result.