/ Published in: PHP

A function to create passwords for new users or password resets.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
/* a function to create passwords for new users or password resets. standard disclaimers apply. not promised to work. take the code as-is. if you like, find errors, or use please let me know at luckygreentiger at gmail */ function randomPassword($maxLength) { $possible = "#0123456789+bBcCdDfFgGhHjJkKmMnNpPqQrRsStTvVwWxXyYzZ-"; if($maxLength == "") { $maxLength = 12; } $beat++; // get rand character from possibles // delete selected char from possible choices $password .= $character; } return $password; }
Comments
