Files
cs157AOnlineBanking/f8l_exception/includes/inc_generatePassword.php
joeyajames e211bb797e Working website, Rev 1.
Register user, login, chg pw, reset pw, view accounts, all work. Can't
create a new account yet.
2014-11-11 20:20:05 -08:00

7 lines
223 B
PHP

<?php
function generatePassword( $length = 8 ) {
$chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*()_-=+;:?";
$password = substr( str_shuffle( $chars ), 0, $length );
return $password;
}
?>