Emuforums.com

Go Back   Emuforums.com > General Discussion > Web development / Programming
Register FAQ Members List Calendar Mark Forums Read

Login to remove all ads!
Reply
 
LinkBack Thread Tools Display Modes
Old November 28th, 2001   #1 (permalink)
Registered User
 
Join Date: Apr 2001
Location: Besançon, FRANCE
Posts: 78
String manipulation in php4

Hello there!
I'm building a website in php/MySQL
in my "resgister" script I want to test the login to check if there is some bad char. in!
Exemple if people put Sek/*@xx as a login ( in regsiter form )
I want to prompt them that there are some bad charactere

How can I get the "ord" of each char. of the $Login
and the length[number of char. of $Login]
Somekind of(not a php script: just an exemple):
PHP Code:
function Good_Char($Login) {
  For(
i=0;i=length($login);i++) {
    if ( (
ORD($Login)>ord("a"))AND(ORD($Login)<ord("z")) ) {
      return 
true;
    } else {
      return 
false;
    }
  }

Thank for your answer.


Ps: FireGL if you see this post! Hello men, and do you see?
I'm back to Emuforums
__________________
All you'll always wanted to know about Sekxx [ www.SEKXX.com ] French Speaking people Only :-/,
But where afraid to ask:
The "Sorry For My English, I'm French" Phylosophie...

Running:
Duron 600@927 [Goog O.C. humm? ]
S.B. live 5.1 Geforce 2MX 215/200 @ 235/215 Toshiba DVD & Creative 8/4/32 CDrW ADSL 640/160 Abit Kt7, Sb5.1+USB+Geforce @ IRQ11 don't Laugh @Me ...

Last edited by sekxx; November 28th, 2001 at 23:10.
sekxx is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT. The time now is 02:14.


Powered by vBulletin® Version 3.7.0 Release Candidate 3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0 RC5