Jump to content

need stric regex for form


Andrus

Recommended Posts

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
Link to comment
https://forums.phpfreaks.com/topic/10466-need-stric-regex-for-form/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.