Getting session variables between different actions
Hello,
I managed starting a session and store some data when a user login to the system. The user can edit his/her prifile by clicking on edit, then some of the data will show in the edit form. Now I have the form with empty fields and I need to get the users data from the session to show in the edit form. Now I have a function for every action for example: login(), edit().., I set the $_SESSION variabls for email and password inside function login, I need to get them back inside function edit, but I get error undefined index Email: this is the code for setting $_SESSION inside login():
$_SESSION['Email']=$HTML['email'];// I was able to print the values
$_SESSION['Password']=$HTML['password'];
I get empty array when I print $_SESSION. I started the session, and I set the variables inside function login. I tried to get them back from inside function edit, but I got empty values.