Jump to content

Help with validating username


cordoprod

Recommended Posts

Warning: preg_match() [function.preg-match]: Delimiter must not be alphanumeric or backslash in /customers/cordoproduction.com/cordoproduction.com/httpd.www/travek/travek.php on line 28

 

I get that error... Here's my code:

function IsUsername($username) {

$regex = preg_match("/^[0-9a-z]$/", $s);

 

if ( preg_match($regex, $username )) {

 

return true;

 

}

 

else {

 

return false;

 

}

}

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.