Hello friends🙂
I v found 2 functions in the net that i want to compile.
The first that counts if are inside the limits.
if(isset($submit_button)){
$error_msg='';
if(trim($username_input)=='' || strlen(trim($username_input)) < 6 || strlen(trim($username_input)) > 15) {
$error_msg.="Please enter a username between 6 to 15 characters long<br>";
}
and the 2nd
function valid_name($name)
{
// return FALSE if it contains characters which
// which ARNT on the specified list
if(ereg('[^[:space:]a-zA-Z0-9_.-]{1,}', $name))
{
return false;
}
else
{
return true;
}
}
that allow only predifined characters to used.
How can i use both functions as one?