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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T21:23:47+00:00 2026-06-13T21:23:47+00:00

I created a system that uses username/password login system with with ‘phpass’ class to

  • 0

I created a system that uses username/password login system with with ‘phpass’ class to store hashes and check passwords when user logs in.

I also use AJAX to load user information (that can only be retrieved if user is logged) with javascript.

My question is, should I check for user’s authentication in every page and in every file that returns AJAX values or just create a ‘connection’ entry in MySQL database.

Is it wrong to use ‘phpass’ functions in every page and request because of performance or is it wrong to use the database method?

What’s the best method to keep user connected and check in every page if the user is logged?

  • 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-06-13T21:23:48+00:00Added an answer on June 13, 2026 at 9:23 pm

    Use a $_SESSION and check it on every page

    i.e.

    $loggedIn = ($_SESSION['logged_in']) ? TRUE : FALSE;

    if($loggedIn == TRUE){
        //Do stuff here for a logged in user...}`
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've created a login system that uses cookies and stores a session ID in
I've created a master page that uses 3 instances of System.Web.UI.WebControls.AdRotator each backed by
We have a system that uses password authentication to access a database, the usernames
I am trying to create a simple log in system that uses ajax but
If I create a text file on an operating system that uses the Latin
I have created a newsletter system that allows me to specify which members should
I'm developing a documents system that, each time that a new one is created,
I currently have a legacy system that uses SPs exclusively for access to the
We have a system that uses ActiveMQ (Queues) - and have exactly one producer
We have a view into a system that uses a value for the unique

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.