Hi,

if(!preg_match("/^[a-z0-9_]*$/", $username))
    {
    // the string contained a char other than a-z, 0-9 and _ (underscore)
    }

Season to taste :)

Justin




on 27/11/02 6:18 PM, Philip J. Newman ([EMAIL PROTECTED]) wrote:

> Where should i start, tips wanted.
> 
> I would like to check a username string for valid charactors before the name
> is processed.
> 
> Someone point me in the right direction please
> 
> ---
> Philip J. Newman.
> Head Developer.
> PhilipNZ.com New Zealand Ltd.
> http://www.philipnz.com/
> [EMAIL PROTECTED]
> 
> Mob: +64 (25) 6144012.
> Tele: +64 (9) 5769491.
> 
> VitalKiwi Site:
> Philip J. Newman
> Internet Developer
> http://www.newman.net.nz/
> [EMAIL PROTECTED]
> 
> *****************************
> Friends are like Stars,
> You can't always see them,
> But you know they are there.
> 
> *****************************
> 
> ICQ#: 20482482
> MSN ID: [EMAIL PROTECTED]
> Yahoo: [EMAIL PROTECTED]
> AIM: newmanpjkiwi
> 
> 

Justin French
--------------------
http://Indent.com.au
Web Development & 
Graphic Design
--------------------


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to