/ Published in: PHP
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<?php /** * Random Password Generator * @public * @param int $length Length of password to generate * @return string Returns randomised password */ function randomPword($length) { $seed = 'ABC123DEF456GHI789JKL0MNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'; $random = ''; for ($i=1; $i <= $length; $i++) { $random .= $singleChar; } return $random; } ?>