I want to check whether special characters such as "<" ">" or the double quote itself is found in a string. But my function always return true.
Thank you
This is the code:
$name = "<h1><dfdafdfds";
function correctName($name){
if (strlen($name) < 5 || (strpos($name, "<")===true) ||
(strpos($name, ">")===true) || (strpos($name, "\"")===true)){
return false;
}else{
return true;
}
}