This is a simple task... you need to add the columns to your database entering time of login and holding a place for the last login.
then when authenticating someone who logs in, you would call there username to display add last login date to the query and store it in the session.
then make a place for it in your header and echo it.
it would look like this..
this is the file which authenticates and stores the session variables when someone logs in. im obviously posting the section which would execute on a successful login.
then you would simple echo the information you just stored in the session in the page that you send them to when they log in. in this example is it UserHomePage.php
$_SESSION['username'] = $username;
$_SESSION['LastLoginDate'] = $LastLoginDate;
notice we session start and then create security so if there is no session username stored we redirect to index.php. but since there is a username stored it shows in the title of the page username 's Dashboard.
then to echo out the LastLoginDate in this example we do the same thing anywhere on the page. in this example im just using echo to call out the LastLoginDate in the middle of the page
<title><?php echo $_SESSION['username']; ?>'s Dashboard</title>
<link rel="stylesheet" href="css/layout.css" type="text/css" media="all">
<?php echo $_SESSION['LastLoginDate']; ?>
<?php include 'nav.php' ?>