/ Published in: PHP
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
function randPassword() { $password = ''; for ($x = 1; $x <= 8; $x++) { // Add a random digit, 0-9 case 1: break; // Add a random upper-case letter case 2: break; // Add a random lower-case letter case 3: break; } } return $password; }