Jump to content


chat login, check for invalid characters/words, ereg


2 replies to this topic

#1 derek.sullivan

    Jedi In Training

  • Members
  • PipPip
  • 341 posts
  • Gender:Male
  • Location:Georgia
  • Interests:preaching, programming, music, friends, outdoors, moves, books

Posted 30 January 2009 - 02:42 PM

Hey all, I'm running a username check to see if the username contains any invalid characters AND or bad words...

here is what I have

if (!ereg("^[a-zA-Z0-9-_]", $user)) {
// error
}

I get this error: Warning: ereg() [function.ereg]: REG_ERANGE in /home/-------/public_html/ctv2.0/chat/chat.php on line 86

any help? rc9 i know you got something brewin

Edited by bigdfbc2008, 30 January 2009 - 02:42 PM.


#2 derek.sullivan

    Jedi In Training

  • Members
  • PipPip
  • 341 posts
  • Gender:Male
  • Location:Georgia
  • Interests:preaching, programming, music, friends, outdoors, moves, books

Posted 30 January 2009 - 02:50 PM

Solved

#3 rc69

    PHP Master PD

  • P2L Staff
  • PipPipPipPip
  • 3,827 posts
  • Gender:Male
  • Location:Here
  • Interests:Web Development

Posted 30 January 2009 - 06:40 PM

View Postbigdfbc2008, on Jan 30 2009, 12:42 PM, said:

any help? rc9 i know you got something brewin
Nope, you solved this before i could even read it. But spelling my name wrong is blasphemy!

Meh, i'll just close this topic for now... pm me if you need it re-opened.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users