What function should I use to check to see if characters OTHER than underscores or alphanumeric exist?
if(preg_match('/[^_0-9a-z]/i',$string) { echo("bad string"); } else { echo("OK (it is just alphanum and _)"); }
HTH Bubble
I've been crawling all over this page: http://www.php.net/manual/en/ref.strings.php with out luck, so thank you very much. ;D
There was a small error:
if (preg_match('/[0-9a-z]/i',$string)) { echo("bad string"); } else { echo("OK (it is just alphanum and )"); }