954,597 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Double Login System

Hi all,

I have a question regarding PHP login systems. Is it possible to have a login system within another login system.

Here's an example: I login to a site and PHP creates the session. I then want to access another page with some higher-secure content so I ask the user to re-type their username/password to gain access to that page.

Can this be done using different sessions or the same session? it would be great if the original session is not ended so once the user finishes on the page with the higher-secure content they can continue to use the previous pages.

Hope this makes sense, any information which could possibly point me in the right direction would be greatly appreciated! :)

TronCraze
Newbie Poster
1 post since Dec 2010
Reputation Points: 10
Solved Threads: 0
 

You can maintain 2 different sessions for user

session one : logged in user $_SESSION['logged_user_id'] = $logged_user_id;

session two : Higher security logged in user $_SESSION['secured_logged_user_id'] = $secure_logged_user_id;

so when you have both the sections with you, you can manage all the other pages with session1 variable. when ever it comes to higher secure page, you can check the data with higher secured session data.

Also you can check everytime session1 is equal to session 2 or not if necessary.

Hi all,

I have a question regarding PHP login systems. Is it possible to have a login system within another login system.

Here's an example: I login to a site and PHP creates the session. I then want to access another page with some higher-secure content so I ask the user to re-type their username/password to gain access to that page.

Can this be done using different sessions or the same session? it would be great if the original session is not ended so once the user finishes on the page with the higher-secure content they can continue to use the previous pages.

Hope this makes sense, any information which could possibly point me in the right direction would be greatly appreciated! :)

saiprem
Posting Whiz in Training
210 posts since Feb 2010
Reputation Points: 16
Solved Threads: 28
 

why you don't grant privileges to your users by adding more column to the user table to save their level [from 1 to what ever]and on each page you check the logged user level with the required to this page.

ahmedelhamahmy
Newbie Poster
3 posts since Mar 2011
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: