Jump to content

user management sessions


2tonejoe

Recommended Posts

ok. i have the mysql db setup with usernames, ids, passwords, access levels, etc .. . . I also have <?phpsession_start();?> in my template header. . .

 

what I am not understanding is how to store the $_SESSION['*****'] variables. I have seen come code, but it isn't clear. . . what is the easiest way to use the $_SESSION for my custom variables: something like $_SESSION['username'] = 'John Henry'; $_SESSION['userlevel'] = 'orange';

 

I understand I can send them from my login form using $_POST, but how do I set them??

Link to comment
https://forums.phpfreaks.com/topic/66362-user-management-sessions/
Share on other sites

to set them...

$_SESSION['the_name_here'] = $its_value_here;

 

 

a Set session; this code would look like:

$_SESSION['the_name_here'];

 

 

to destroy them either all sessions

session_destroy();

 

 

of you can kill them individually / by group using

unset($_SESSION['name'], $_SESSION['name2']);

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.