Results 1 to 5 of 5

Thread: How to reset password created in PHP

  1. #1
    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: '[email protected]'

    user name: dheerajp
    email:"[email protected]"

    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.

  2. #2
    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 ...

  3. #3
    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

  4. #4
    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.

  5. #5
    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

Similar Threads

  1. Impact of AD minimum password age to password reset
    By cmatthews18 in forum Networking & Security
    Replies: 1
    Last Post: 14-03-2012, 01:33 PM
  2. Replies: 9
    Last Post: 17-01-2011, 02:18 PM
  3. Need Password Reset Disk to change password for Windows 7
    By Alfanumeric in forum Operating Systems
    Replies: 3
    Last Post: 11-01-2011, 04:06 PM
  4. Reset CMOS password requires reset bios?
    By Aditya kumar in forum Operating Systems
    Replies: 2
    Last Post: 04-08-2009, 05:27 PM
  5. XP asking for a password that was never created!
    By Farley in forum Operating Systems
    Replies: 3
    Last Post: 24-10-2008, 04:24 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,751,891,453.44321 seconds with 16 queries