Hi,
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.
Code:
<div id="left">
left div content
</div>
<div id=-"right">
<?php
if(isset($_SESSION['email']) && isset($_SESSION['pass']))
{
?>
//show user some links to his account.
<?php
}
else
{
?>
//show login and register forms
<?php
}
?>
</div>
But it didn't work. how should i do this?