= $timetik"; $rec1 = $my_mysqlclass->q($sSQL1); $nr = $my_mysqlclass->nr($rec1); if($nr < 1){ $errtxt = "Sorry No such user found. Or your link has expired"; }else{ $newpass = rand_str(7); $sSQL1 = "update tbl_custommers set customer_pws='".md5($newpass)."' where customer_username = '$email_address'"; $rec1 = $my_mysqlclass->q($sSQL1); $sSQL1 = "delete from tbl_resetpassword where customer_emailadd = '$email_address'"; $rec1 = $my_mysqlclass->q($sSQL1); $to = $email_address; $subject = "Password Modification: Submit Edge"; $sendMail = new mailit(); $sendMail->MsgFromTpl($to,$subject,"tpl/mails/newpassword.tpl.php",$fromEmailID); $sendMail = NULL; header("location: forgotten_password.html?done=2"); } } if(form_get("frmforgot") == 1){ $email_address = form_get('email_address'); $sSQL1 = "select * from tbl_custommers where customer_username = '$email_address'"; $rec1 = $my_mysqlclass->q($sSQL1); $nr = $my_mysqlclass->nr($rec1); if($nr > 0){ $rndVal = rand_str(10); $sSQL1 = "insert into tbl_resetpassword (customer_emailadd , randomkey , ondate) values ('$email_address' ,'".$rndVal ."' ,'".time()."')"; $rec1 = $my_mysqlclass->q($sSQL1); $to = $email_address; $subject = "Email Confirmation for Forgot password: Submit Edge"; $link = $arrConfig["site_url"] ."forgotten_password.html?emailid=$email_address&key=$rndVal"; $sendMail = new mailit(); $sendMail->MsgFromTpl($to,$subject,"tpl/mails/forgotpassword.tpl.php",$fromEmailID); $sendMail = NULL; header("location: forgotten_password.html?done=1"); }else{ $errtxt = "Sorry No such user found."; } } ?> if($_GET["done"] == 2){ echo "