My fellow success-oriented people,
i need to code my password field to contain the minimum character of 6 characters and reject any entry lesser than 6 characters. How do i do it?
Regards
adsegzy
How to code minimum entry
Moderator: General Moderators
Re: How to code minimum entry
Flattery'll get u nowhere lol
In php it would be something like
If you have time you could also do a JavaSCript as well AFTER YOU HAVE GET THE SERVER SIDE WORKING!
In php it would be something like
Code: Select all
if (strlen($_GET['password']) < 6)
{
// Do something to let user know that the form has been refused
}
Code: Select all
<script type="text/javascript>
function validateForm()
{
if (getElementById('password').value.length < 6)
{
alert('BAD');
return false;
}
}
</script>
<form action="#" method="get" onsubmit="validateForm()">
<input type="password" name="password" id="password">
</form>
Re: How to code minimum entry
Probably shouldn't double-post your questions either.........