Jump to content

Restrict characters on registration


M.W.S.

Recommended Posts

regular expressions

 

I use this

 

foreach($_POST as $field => $value)

{

if (ereg("(Name)",$field))

{

if (!ereg("^[A-Za-z' -]{1,50}$",$value))

{

unset ($_GET['do']);

$message_new = "$field is not a valid name, please check and try again.";

header("Location:index.php?page=register");

exit();

}

}

$$field = strip_tags(trim($value));

}

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.