"; print " self.location='forgotpassword.php?msg=3';"; // Comment this line if you don't want to redirect print ""; } //$userid = $_SESSION['userid']; //if ($userid == "") //{ //$userid = $_GET['userid']; //} $query="SELECT * FROM plus_signup WHERE userid = '$userid'"; $st=mysqli_query($link,$query); $recs=mysqli_num_rows($st); $row=mysqli_fetch_object($st); //$rec = mysqli_fetch_array($query); //$em=$row->email;// email is stored to a variable //$userid=$row->userid; $sec_temp=$row->sec; $pass_temp=$row->password; $email=$row->email; if ($email=="" || $sec_temp=="") { print ""; } if ($recs == 0) { print ""; } if ($_POST['submit1'] == "Reset Password") { if ($_POST['password'] <> $_POST['password2'] || $_POST['password'] == "") { print ""; $match = "NOTOK"; }else{ $match = "OK"; } //$userid = $_POST['userid']; //$sec = strtolower($_POST['sec']); if ($_POST['sec_temp'] != strtolower($_POST['sec'])) { print ""; $secure = "NOTOK"; }else{ $secure = "OK"; } $password = sha1($_POST['password']); if ($password == $pass_temp) { print ""; $pass = "NOTOK"; }else{ $pass = "OK"; } if ($match == "OK" && $secure == "OK" && $pass == "OK") { $result = mysqli_query($link,"UPDATE plus_signup SET password='$password' WHERE userid='$userid'") or die(mysqli_error()); } if(mysqli_affected_rows($link) == 1) { print ""; } elseif (mysqli_affected_rows($link) == 0) { $msg = "
Error occured, please try again. If this keeps happening pleasd contact the site admin at jstimpson@co.weber.ut.us
"; } } if ($_GET['msg'] == 1) { $msg1 = "
Password is empty or does not match
"; }elseif ($_GET['msg'] == 2) { $msg1 = "
Incorrect Security Question
"; }elseif ($_GET['msg'] == 6) { $msg1 = "
Cannot update password to the same password.
"; } ?> Sheriff Employee Section

Notice: Undefined variable: msg1 in /var/www/localhost/htdocs/sheriff/online_sheriff/signup/forgotpasswordck.php on line 162

Notice: Undefined variable: msg in /var/www/localhost/htdocs/sheriff/online_sheriff/signup/forgotpasswordck.php on line 162
"; //$status= "NOTOK";} ?>
User ID:
Notice: Undefined variable: userid in /var/www/localhost/htdocs/sheriff/online_sheriff/signup/forgotpasswordck.php on line 183
New Password:
Re-enter Password:
Security Question: Where were you born?