循环遍历mysql数组并为每个变量创建一个会话

I have two types of users, Manager and employees. Currently I have a session working when the manager is logged on. To allow the manager to view each individual employees i need to create another session for each employee, to remeber which employee he has clicked on.

How would I do this, how would I remember the ID of the employeer?

Try creating session variable like this

$_SESSION['counter'. $studentID] 

To parse a single ID from page to page - there is no need to use Sessions.

Just parse it through the URL. For Example:

<a href='page2.php?id=248>link to page2</a> 

then to retrieve this you will need on the other page :

$id=$_REQUEST['id'];

That worked for me!

But be careful you don't want to be parsing passwords and other secure information through the URL