does anyone know of any coding that can automatically recover passwords for the sp/youngson script by entering the email addy used to register
Lost Password Recovery
Collapse
X
-
on my site whenever the user register they get a welcome message via email.. whenever they select lost pass they enter there user name and email address. ..
then check if user name correspond with with the email
assuming you know how to set up a email form..Code:$sql = mysql_fetch_array(mysql_query("SELECT nick FROM mc_users WHERE nick='".$nick."' And email='".$email."'")); if($sql[0]==0) { echo "user name didn't match email"; } else { //get pass from db $sql = mysql_fetch_array(mysql_query("SELECT pass,email FROM mc_users WHERE id='".callnid_nick($nick)."'")); if($sql) { echo email_form($sql[0],$sql[1]); } else { echo "DB ERROR".mysql_error(); } }
R.M.C
----------
PHP Adovocate B)
-
when i first created one like that it used to send the md5 passwordon my site whenever the user register they get a welcome message via email.. whenever they select lost pass they enter there user name and email address. ..
then check if user name correspond with with the email
assuming you know how to set up a email form..[/b]Code:$sql = mysql_fetch_array(mysql_query("SELECT nick FROM mc_users WHERE nick='".$nick."' And email='".$email."'")); if($sql[0]==0) { echo "user name didn't match email"; } else { //get pass from db $sql = mysql_fetch_array(mysql_query("SELECT pass,email FROM mc_users WHERE id='".callnid_nick($nick)."'")); if($sql) { echo email_form($sql[0],$sql[1]); } else { echo "DB ERROR".mysql_error(); } }
Comment
-
Guest
I don't know this script but yes - if its uses md5 to encrypt passwords, then offcorse it will send the md5ed password , and the its useless, so its not possible to make password recovery if they are md5'ed, BUT you can make an password RESET system, its simple, if user lost hes password , he just go to password recovery and input hes nick and e-mail, then when press submit, he gets an e-mail with link where he can reset (make new one) password .... Just make an table in mysql when for each password request script makes an session, and put that session to that reset link so script resets correct user ... Think you understood me
Comment
-
well do you think
encrypting the user pass
make sense.....
if you got
index.php?user=mc_keny&pass=blabla well
it would of make sense..
i only encrypt the
session/time id on my site
Code:{ echo signin_form(four); } else { mysql_query("UPDATE mc_users SET xtime='".$extime."' WHERE nick='".$sinnick."'"); $xtime = mysql_fetch_array(my sql_query("SELECT xtime FROM mc_users WHERE nick='".$sinnick."'")); //use the time to get a different time id each time they login $time = time(); $xt = ($time+ $xtime[0 ]*60); $tid = md5($sinnick.$time); $insert = mysql_query("UPDATE mc_users SET extime='".$xt."', tid='".$tid."', lvis='".date("H:i a")."' WHERE nick='".$sinnick."'"); if(!$insert) {echo mysql_error(); } else{ echo align(center);
R.M.C
----------
PHP Adovocate B)
Comment
-
Guest
So, what you want do do ? or what you don't know ?? How to set up an e-mail form ? you just in first post said that you have an e-mail system (when user registers he gets an e-mail) , so whats the problem ? just modified and use that e-mail system to password recovery, principle is the same .... - that if you want to set up an e-mail system to you password recovery ... Its hard to understand what really you want
Comment
-
Guest
sorry dude , my bad ...wtf?
did i said i WANT or i dont know how to do something???
i replied to dark desire post asking him if he think encrypting the user pass make sense...
i dont see WHERE in that post am asking for help
[/b]
Comment
Comment