I have a function looking like this:
function makepassword($length = 5) {
srand( (double) microtime() );
$which = "";
$password = "";
for ($i=0; $i < $length; $i++) {
$which = rand(1, 3);
if ( $which == 1 ) $password .= rand(0,10);
elseif ( $which == 2 ) $password .= chr( rand(65, 26) );
elseif ( $which == 3 ) $password .= chr( rand(97, 26) );
} return $password;
}
How do I get the $password into the code? I tried makepassword($password) and some variations of that. The function is in an functions.php file, which is included sametime as the header of the document.
Regards,
Stig