I'm making a registration form.
What functions can I use to make sure people only use the letters a-z, numbers 0-9, underscores and hyphons?
use regular expressions to match that and give an error if they dont match
More specifically, here is one that only allows A-Z, a-z, and 0-9
if (!eregi('[[:alnum:]]',$your_input)) { //do some error stuff here }
If you need to allow spaces, just change [[:alnum:]] to [[:alnum:][:space:]]
Hope this helps