passwords - Generating random words in PHP -
this code, getting error called "undefined function get_random_word". help.
if(isset($_post['submit'])){ $email = mysqli_real_escape_string($connect,trim($_post['email'])); $new_password = get_random_word(6, 13); if($new_passowrd==false){ throw new exception('oops! '); } $rand_number = rand(0,999); $new_password .= $rand_number; mysqli_select_db($connect,"membership"); $result = "update users set password = sha1('".$new_password."') email = '".$email."'"; $q = mysqli_query($connect,$result) or die(mysqli_error($connect)); if(!q){ throw new exception('oops!'); } else { return $new_password; } } ?>
can me create it. want generate random password user. thanks
get_random_word not standard php function. apparently, get_random_word() in user_auth_fns.php5 library.
http://www.phpbuilder.com/board/archive/index.php/t-10331068.html
Comments
Post a Comment