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 6198617
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T04:02:59+00:00 2026-05-24T04:02:59+00:00

Afternoon SO. Basically I have a page with a login form where the user

  • 0

Afternoon SO. Basically I have a page with a login form where the user is asked to input their username and password. Then i match these username and a hashed version of the password with the Passwords database in MySQL.

Now, seeing as I have no idea what hackers/expoilters are capable of i would just like to never retrieve the hashed version of the right password from the database and compare it on the server. I have scoured google and the MySQL tutorial websites but I cant seem to get a clear answer (i might be drowning in shallow water here). Basically this is what i want to do:

  • User inputs username + password.
  • I forward this information to MySQL through a stored procedure.
  • Stored procedure returns TRUE/FALSE (1 or 0 doesnt matter) if a match is found.

Thankyou very much for your time.

  • 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-24T04:03:00+00:00Added an answer on May 24, 2026 at 4:03 am

    I’m not quite sure what you’re after, but if I understood the question correctly, you want to do something like this:

    SELECT password FROM users WHERE username = '$username';
    

    and then compare the passwords with PHP, and you’re concerned that this might become a security issue.

    I don’t think it makes any difference in the security standpoint. The usual way of checking if the password is correct is:

    SELECT COUNT(*) FROM users WHERE username = '$username' AND password = '$hashedPassword';
    

    If count == 1, the user gave the correct password. You can see that MySQL doesn’t give the actual password at any point if the passwords don’t match. Even if it did, it’s nearly impossible for a hacker to get access to that information. If they can, they have already hijacked your server and this is the least of your problems.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Afternoon all. I have the following scenario: I have a search page where by
I've been pulling my hair out on this one all afternoon. Basically, I have
Good Afternoon, I have a html aspx page that has many many div elements.
Good afternoon In Java, I have HashSet which contain list of Object User which
Good afternoon, Wow what a title. Basically here is the thing. If have a
Afternoon, Lets say I have gather a random selection of users: User.find(:all, :limit =>
Afternoon Developers, I have a problem that's beginning to get on my wick. I
Afternoon, I am trying have an HTML file containing a frameset which contains two
Good afternoon, I have a web query in Excel 2002 going against a web
Good afternoon all, I have a class which looks like this: public class Grapheme

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.