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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T17:55:28+00:00 2026-05-30T17:55:28+00:00

I was thinking of writing my own authentication script but I don’t know much

  • 0

I was thinking of writing my own authentication script but I don’t know much about security.

From the articles I’ve reading, it looks like it usually involves hashing the password with a salt and storing it in the database. Then when user requests to log in, password is hashed and compared with the database. If it matches, then the user’s data is stored in $_SESSION.

However, I don’t know if this is secure or not. I read something about storing session keys in the database but I’m not sure about how that works, or how to implement that.

Can someone explain how to implement secure authentication?

Also, are there any suggestions for PHP authentication libraries I can incorporate that are easy to learn instead of writing my own?

  • 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-30T17:55:29+00:00Added an answer on May 30, 2026 at 5:55 pm

    Check this answer here.

    Although the answer is 3 years old, the suggested phpass library is up to date.

    Also, +1 to Aron Cederholm. Password security is an extensive subject and you should look first at the related questions already discussed here on StackOverflow so you will be more familiar with the subject and best practices in security.

    Although I like frameworks (Symfony, Zend, etc) as they generally implement these good practices, just using them don’t make you a good programmer. You have to learn its inner workings. I always salute a programmer dwelving into coding his own secure authentication mechanism (as long as they don’t implement it in a live site that really needs strong security), because that’s the best way to learn and understand the inners of the subject. Always start from an existing implementation, and THEN use that as an example for creating your own codebase.

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

Sidebar

Related Questions

I'm thinking about writing my own little language. I found a few options, but
I am thinking about writing my own release storage server and before I do
Lately I've been thinking about writing my own language - something I've wanted to
I was thinking about writing my own MembershipProvider for my web app. People won't
I'm thinking about writing a FLAC to ALAC and/or FLAC to AAC converter, probably
I'm thinking of writing an app to selectively transfer photos/music to and from my
I'm thinking of writing an app for the iphone. But I'm confused in regards
I'm thinking about writing a small application that will help me mass rename files.
I am thinking about writing a plugin for email application. It can be put
As a pet project, I was thinking about writing a program to migrate applications

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.