I assume that you are using the MySQL database to retrieve information of the users when loging in.
if($login_success){
$email_to="[email protected]";
$email_subject="A user logged in to the system";
$email_from='[email protected]';
$email_message = "Following user has logged in to the system at ".$time."\n\n";
$email_message .= "Name : ".$name."\n\n";
$email_message .= "Email : ".$email."\n\n";
$email_message .= "User ID: ".$user_id."\n\n";
$headers="From: ".$email_from."\r\n".
'Reply-To: '.$email_from."\r\n" .
'X-Mailer: PHP/' . phpversion();
@mail($email_to, $email_subject, $email_message, $headers);
}
Time of the login can be calculated – $time= date('l jS \of F Y h:i:s A');
Hope this helps