Jump to content


Photo

need stric regex for form


  • Please log in to reply
No replies to this topic

#1 Andrus

Andrus
  • Members
  • Pip
  • Newbie
  • 5 posts

Posted 25 May 2006 - 10:45 PM

hey i need something to restrict alot of funny chars in the username

right now i got this

// check the username for bad chars
if(!eregi("[A-Z]",$username)){
echo '<script language="Javascript">alert ("Bad characters in username")</script>';
include("index.html");
exit();
}


but it still allows weird looking characters like Ũ and stuff, how do i restrict it to only A-Z and a-z




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users