Im wondering how to make it so that when a user registers for my website they are not allowed to use special characters in the username and password...
i wrote this:
if(eregi(':;[]{}"\'\<\>,.!@#$%^\&*()-_+=', $password)) {
//do something
} else if(eregi(':;[]{}"\'\<\>,.!@#$%^\&*()-_+=', $username)) {
//do something again
}
in the code are some backslashes but they wont show here... :S
but it wont work, it shows me an error, though i have no redirect in my script it continues to another page withing the second... so i could not post it here..
but i saw flashing by that the eregi didnt work well and it was a warning about it...
Anyway. i looked at php.net and didnt find anything else but mail validators :S so im asking here... how do i fix this 🙂
thanks in advance!! 😕