Re: Is there a special character I here?
| From: | ERISEN, Mehmet Kamil | Date: | Thu, 16 Aug 2001 21:43:46 +0000 |
| Subject: | Re: Is there a special character I here? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-63106@lists.php.net to get a copy of this message | ||
I use a javascript to do that for my forms:
if (window.RegExp) {
var reg = new RegExp("^[_0-9a-z]*$","gi");
if (!reg.test(f.elements['username'].value)) {
alert("Kullanici adi harf ve/veya rakamlardan
olusmalidir. Lutfen Duzeltiniz!");
f.elements['username'].focus();
return(false);
}
}
I am sure you could write something similar with PHP.....
--- Brandon Orther <orther@webintellects.com> wrote:
> Hello,
>
> I am looking for a way to check a string if it has
> anything other than
> Numbers or Letters. Does anyone know how to do this?
> Thank you,
>
> --------------------------------------------
> Brandon Orther
> WebIntellects Design/Development Manager
> brandon@webintellects.com
> 800-994-6364
> www.webintellects.com
> --------------------------------------------
>
>
=====
Mehmet Erisen
http://www.erisen.com
__________________________________________________
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/