Files
cs157AOnlineBanking/f8l_exception/includes/inc_generatePassword.php

7 lines
223 B
PHP
Raw Normal View History

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