Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- include('authenticate.php'); // Includes Login Script
- $date = date('Y-m-d H:i:s'); //now you can save in DB
- $updateTime = "SELECT Accounts SET LastLoggedIn = '$date' WHERE username = '$username'";
- mysqli_query($conn, $updateTime);
- $messages = '';
- $_SESSION['LastLogIn'] = $row['LastLoggedIn'];
- if(is_NULL(mysqli_num_rows($updateTime)))
- {
- $messages .= "Welcome New User";
- }
- else
- {
- $messages .= 'Welcome Back, User. Last Login in was: $_SESSION['LastLogIn'] = $row['LastLoggedIn']';
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement