Hello there,
how do i code my password field to take minimum of 6 characters.
secondly, is it possible to code MT_RAND to generate a particular maximum numbers of characters for my confirmation code.
regards,
Olusegun
field minimum
Moderator: General Moderators
Re: field minimum
Since you're posting on this php board I'm assuming that you want to use php to determine the password length involving a trip and back to the server.
You could always use javascript for a clientside check and / or the php.
for php use something like this...
<?
$minimum_password_length = 6;
$password = $_POST['password'];
if(strlen($password)>$minimum_password_length){
//do here what you want to do if the password does not meet the minimum length
}else{
//do here what you want to do otherwise...
}
?>
cheers,
George.
You could always use javascript for a clientside check and / or the php.
for php use something like this...
<?
$minimum_password_length = 6;
$password = $_POST['password'];
if(strlen($password)>$minimum_password_length){
//do here what you want to do if the password does not meet the minimum length
}else{
//do here what you want to do otherwise...
}
?>
cheers,
George.
Re: field minimum
Thanks alot daktau, i reallly appreciate your help.
much love
much love