How can I find a element in a string with the php function strpos
. I get a parse error whenever I execute the function with the $error string.
[Symfony\Component\Debug\Exception\FatalErrorException] parse error
$error = 'You have an error in your SQL syntax;
check the manual that corresponds to your MySQL server version
for the right syntax to use near
'"=<script>alert('o7v87r99ib')</script>"' at line 1';
$str = '=<script>alert('o7v87r99ib')</script>';
if(strpos($error, $str)){
echo 'Found: ' . $str;
}