tamanna — 2011-09-12T01:42:42-04:00 — #1
I am working with forget password in php with my sql,if a user has forget his name ,he can write his name and email id and password is sent to his mail id....how i can do this???? I am working on online PHP web application.
martinplatt — 2011-09-12T03:05:19-04:00 — #2
I would expect that you would store the users' e-mail address when they register.
If they request a password reset, you send them an e-mail to confirm this.
Then you create a new random password, and e-mail that to them.
I'm sure that there would be PHP code for free if you Google it.
vazqjose — 2011-09-12T14:07:50-04:00 — #3
dumler — 2011-09-12T15:15:35-04:00 — #4
Quoting to MartinPlatt,
Yeah the basic idea of resetting easily your password is the method where you send user a link (usually which holds user id in the link as a variable) and make a function to reset that user id password and send a new password to his email.
Very easy to script.
gauvion — 2011-09-12T16:38:02-04:00 — #5
create a field in your users table called "forgot_pw_hash" that will store a random md5 or encrypted value. when a user clicks on forget password, update the database with this has then email it to them. when they visit a page with the GET variable set to that hash, allow them to change their password.
tamanna — 2011-09-13T02:02:30-04:00 — #6
i have made a login table with username and password in md5 form...so i can't use that login table if a user has forget his password...
i will make a forget table but how it will match with login table
i am very confused please help...
tamanna — 2011-09-13T02:03:49-04:00 — #7
can you please suggest me a script...
dumler — 2011-09-13T12:46:24-04:00 — #8
I have no clue what you tried to point out there, but here is a script for ya!
You really should use google by yourself.