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

  • SEARCH
  • Home
  • 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 713523
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T04:58:15+00:00 2026-05-14T04:58:15+00:00

For a login system in php would this be a suitable outline of how

  • 0

For a login system in php would this be a suitable outline of how it would work:

users types in username and password, clicks login button.

  1. Checks if user exists in database,
  2. if it does, then retrieve the salt
    for that user
  3. hash the password and
    salt (would this be done on the
    client or server side? I think
    client side would be better, but php
    is server side so how would you do
    this?)
  4. check value against value in
    database,
  5. if the values match then
    user has typed in correct password
    and they are logged in.
  • 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-14T04:58:15+00:00Added an answer on May 14, 2026 at 4:58 am

    Checks if user exists in database, if it does then retrieve the salt for that user hash the password and salt

    No. This means you are hitting your database twice.

    hash the password and salt (would this be done on the client or server side? I think client side would be better

    No. The point of hashing the password is so that if someone compromises your database, they can’t (easily) find out what they need to send to your system (or other systems) to log in as that user.

    If you hash the password before sending it to the server, then the attacker can bypass the JS and send the prehashed password read from the database to your system.

    1. User submits username and password
    2. Password is hashed with the standard salt for the system
    3. SELECT some,cols FROM your_users WHERE username=? and password=?
    4. Count the number of rows returned from the database.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a login system requiring a username and a password. I want to
I am developing a PHP-based login system. Each user has an ID(a number) and
I'm using PHP 4.3.9, Apache/2.0.52 I'm trying to get a login system working that
I am creating a login system for a web application using PHP. My question
I want to make a login system using ASP.NET (MVC). On the internet, I
I'm attempting to convert a home-grown login system to the standard asp.net login control
The bugzilla (perl-based) system has a feature to login automatically by using a http
I've got a web system where users log in, and it stores a cookie
The login page in my Tapestry application has a property in which the password
I have a login system. With my login session stores and cookies (if you

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.