Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6530123
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T09:43:04+00:00 2026-05-25T09:43:04+00:00

When a user forgets his password, there is an email sent to his email

  • 0

When a user forgets his password, there is an email sent to his email account with a link and token (unique) to resetpassword.php

When the authentication is correct then he is able to change the password. My question is how can this happen?
The quick and easy way is to email him a new password and let him change it through his CP, but is this a good user-experience?

    $result = mysql_query("SELECT member_id FROM members WHERE forgotpass='$token'");
        if(mysql_num_rows($result) == 1) {

            WHAT GOES HERE?
    }
    else {
        die("Query failed");
    }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T09:43:04+00:00Added an answer on May 25, 2026 at 9:43 am

    WHAT GOES HERE?

    there should be something like

    echo 'Your password was mailed to you';
    mysql_query("UPDATE members SET password = '".$random_hashed_string."' WHERE forgotpass='$token'");
    mail($to, $subject, $message." password:".$random_hashed_string, "From: support@support.com");
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

User click on a link button and it will direct them to a url
I am using authlogic with rails application for authentication. The perishable token is reset
In case a user forgets to enter an input area or enters an invalid
I am designing an application where the user selects the option to update his
What PAM call do I have to make to reset a user's password? I
We have a system that uses password authentication to access a database, the usernames
I use Htdigest authentication with lighttpd. When the user first logs in to the
In my web app, when a user logs in, I add his Id to
I have a PHP application form for medical health plans where the user fills
I'd like to provide password protection for my app. Is there a standard way

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.