I have an admin section to one of my websites I am building.
The variables it logs in by is email address and password.
Obviously each email address is unique to each admin, although I do have an 'admin_id' column which increments automatically per row.
The other columns stored within my admin table are - First Name (String), Last Name(String), Level(int).
I have tried -
$_SESSION['admin_id']=$_GET['admin_id'];
But when I try and simply echo the id, nothing is displayed.
Yet this line of code:
if(!isset($_SESSION['admin_email']))
die("<meta http-equiv='refresh' content='0; url=login.php'> ");
Manages to get the 'Admin_email' column from the table.
I am confused as to how to add other columns into my session data.
Many thanks in advance.