on my site users have a profile, I am going to use mod rewrite to let them save into the database a username that will link to the profile id
example
site.com/jasondavis
will redirect to there profile
site.com/23
so the part I need help with is when I let them pick a URL name.
I will call the variable they submit
$urlname
so how can I make sure $urlname has no spaces or characters that would not be good in the browser address bar?