Hello, I need to validate a username which can only be alphanumeric and maybe contain an underscore.
I wrote this:
function validate_username($v_username) {
return (eregi("[a-zA-Z0-9]",$v_username));
}
which does not validate "#$%" but does validate "Ann#$%"
Can somebody help me and tell me which modfier I am supposed to add where to make the username accept only alphanumeric characters and underscores?
Thansk a lot.