eregi("^[A-Za-z0-9_-]+$",$foo) is what i use.
so just change that to eregi_replace
$username = eregi_replace("^[A-Za-z0-9_-]+$","",$username)
i didn't like relying on \w or \W (and i think i had some problems with it)
__________________
php/mysql guru. hosting, coding, all that jazz.
|