We're a community of 1077K IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,076,394 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

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! :)

3
Contributors
2
Replies
3 Months
Discussion Span
2 Years Ago
Last Updated
4
Views
TronCraze
Newbie Poster
1 post since Dec 2010
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 0

You can maintain 2 different sessions for user

session one : logged in user $_SESSION = $logged_user_id;

session two : Higher security logged in user $_SESSION = $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
214 posts since Feb 2010
Reputation Points: 16
Solved Threads: 29
Skill Endorsements: 0

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
Skill Endorsements: 0

This article has been dead for over three months: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
View similar articles that have also been tagged:
 
© 2013 DaniWeb® LLC
Page rendered in 0.0588 seconds using 2.64MB