how to check if user is logged in or not?
i have created a simple register and login system using phpmyadmin. On index.html page there are 2 divs. Left and right. On the right div there are 2 forms login and register. Register and login works fine. when user logs in, he is directed to another page.
Now, after login if user comes to index.html page, i need to show him different options in the right div.. like. his dashboard, and more links to his personal account. To do that i changed index.html to index.php and added this code.
But it didn't work. how should i do this?
left div content
if(isset($_SESSION['email']) && isset($_SESSION['pass']))
//show user some links to his account.
//show login and register forms