This php function will generate random characters. This randomChar() function has a paramters of $limit which is the number of character that you want to return and the $char which you can change the default character type that you want to return.
function randomChar( $limit=5, $char="abcdefghijklmno01234" ){
for($x = 1; $x <= $limit; $x++){
$newPass .= substr($char, mt_rand(-1, -(strlen($char))), 1 );
}
return $newPass;
}
Hi Mark, keep up the good work! nice site and simple yet helpful tutorials.
Please feel free to make a comment and suggestion on this tutorial. Your comment and suggestion will help improve the tutorial for the benefit of you and others. Thank you...