Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 05-02-2009
Member
 
Join Date: Feb 2009
Posts: 56
How to reset password created in PHP

Hello
I need to modify this code for users who have forgotten their password.
the problem is if one user have more profiles with same email - then this script can’t send the user name and password.

Example
user name : saman
email: 'myid@test.com'

user name: dheerajp
email:"myid@test.com"

I have created these above two accounts with the same email address, and I cannot access anyone of these so how do I recover that, and all the coding have done in the PHP.

please help.
Reply With Quote
  #2  
Old 05-02-2009
Member
 
Join Date: Feb 2009
Posts: 133
Re: How to reset password created in PHP

According to me you must not allow a user to create multiple IDs with a single email address.

Do you asking for the code? I think if you allow an user to have multiple IDs with single email ID then you have to provide total information to that person with the mail ID. You need to give all IDs & their Passwords to that user when he forgets any of the id or password.

Sorry if am not able to understand what you are asking for?
__________________
IF YOU CAN'T Convince THEM ...

CONFUSE THEM ...
Reply With Quote
  #3  
Old 05-02-2009
Member
 
Join Date: Mar 2008
Posts: 258
Re: How to reset password created in PHP

don't allow multiple accounts with same email address solves the problem. single account per email address only.

another way would be for forgotten password you request both email address and username to do the lookup with instead of just email.

also if you encrypt the passwords in the db (like you should be doing) then you can't actually email them their password but instead you must provide a forgot password update script
Reply With Quote
  #4  
Old 05-02-2009
Member
 
Join Date: Feb 2009
Posts: 56
Re: How to reset password created in PHP

Please provide me code so that I could apply it to my existing code and check if I get anything happens for me.
Reply With Quote
  #5  
Old 05-02-2009
Member
 
Join Date: Apr 2008
Posts: 193
Re: How to reset password created in PHP

Hi there you problem is simply your query this is an easy fix try this Sql Query

PHP Code:
$Query mysql_query("SELECT * FROM `profiler` where `email` = '" mysql_real_escape_string($_POST['mail']) . "' AND `username` = '" mysql_real_escape_string($_POST['username']) . "';"); 
dont forget to escape your varibles that are untrusted.... you never know what they might be trying to do
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "How to reset password created in PHP"
Thread Thread Starter Forum Replies Last Post
Impact of AD minimum password age to password reset cmatthews18 Networking & Security 1 14-03-2012 01:33 PM
Locked out from hotmail - forgot password so cannot reset password Talishh Windows Software 9 17-01-2011 02:18 PM
Need Password Reset Disk to change password for Windows 7 Alfanumeric Operating Systems 3 11-01-2011 04:06 PM
Reset CMOS password requires reset bios? Aditya kumar Operating Systems 2 04-08-2009 05:27 PM
XP asking for a password that was never created! Farley Operating Systems 3 24-10-2008 04:24 PM


All times are GMT +5.5. The time now is 07:57 PM.