Jump to content

allow a-z A-Z 0-9 and underscore in a variable used for username sign up


jasonc

Recommended Posts

i have the following that allows letters but i need it to also allow numbers and underscores and i can not work out what needs changing to get this to work.

 

!eregi("^[[:alpha:][:space:]]{3,30}$", $username )

 

i tried this...

 

!eregi("^[[:alpha:][:space:][0-9]]{3,30}$", $username )

 

to allow numbers but it did not work.

 

 

thanks in advance for your help.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.