How can i send multiple sessions variables to a page?
For example i have a login.php page which verifies a user’s email and password and access level (admin, teacher, student) stored in database and grants access accordingly to student.php, admin.php, faculty.php
On the student.php, admin.php and faculty.php pages i have set session blocks which check the user level received from previous pages and allows or denies access accordingly.
So far this works fine, however now i would like to create specific page for each user for which i need to check user level (admin, user, faculty > which is already being checked ) + their specific user id or email using which i could generate specific content catered to them..
So getting back to my question, is there a way to send multiple variables to a page??
Or more importantly, if im not thinking in the right track is there a better way of doing this?
Many thanks,
Yes. Simply declare
$_SESSIONas an array.Manual Reference