Hey, i'm on a steep learning curve.
I have to be complete converted to PHP from ASP.NET in a week. I'm trying to convert some SQL Protector from ASP.NET to PHP Now this function doesn't seem to work.
I have loaded an array with allow chars then used ! which i had picked up as NOT.
So the strstr function should come back with the first charater that not in the allow array. Thats what i belive this script should be doing but it's not.
Can someone point me in the right directory? please
BTW no errors are displayed.
PHP Code:<?
$allowchar = array("a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "@", ".", "-", "_", "+");
if (strstr($checkuser,!$allowchar)) {
echo "there is some bad mojo in this string";
}
?>




Reply With Quote