function generatePassword($len)
{
$al = '0123456789abcdefghijklmnopqrstuvwxyz';
$password = "";
$len = 5;
for ($index = 1; $index <= $len; $index++)
{
$randomNumber = rand(1,strlen($al));
$password .= substr($al,$randomNumber-1,1);
}
return $password;
}