I am trouble with session; I know it theoretically but I encountered with it how to use session , transferring username to
After the line
$result=mysql_query($sql);
add
if ($data = mysql_fetch_array($result)) { $_SESSION['user'] = $data['usermail']; }
Now session created.Call this session in jcte/index.php page as:
Unset the session in logout.php page as: