PHP code to check if a string has something other than word characters (0-9a-Z_)
Code:
if(preg_match("/\W/", $string) {
error("Invalid characters in name, please use only a-Z 0-9 and _");
}
error() being pseudo code of course... could forward to invalid_name.php or something to spit that out..
farce