0

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
4
Views
6 Years
Discussion Span
Last Post by ahmedelhamahmy
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! :)

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.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.