Advertisement
Guest User

ooga Booga

a guest
Apr 9th, 2020
556
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.53 KB | None | 0 0
  1. <?php
  2.     include('authenticate.php'); // Includes Login Script
  3.    
  4.     $date = date('Y-m-d H:i:s'); //now you can save in DB
  5.     $updateTime = "SELECT Accounts SET LastLoggedIn = '$date' WHERE username = '$username'";
  6.     mysqli_query($conn, $updateTime);
  7.     $messages = '';
  8.     $_SESSION['LastLogIn'] = $row['LastLoggedIn'];
  9.    
  10.    
  11.    
  12.     if(is_NULL(mysqli_num_rows($updateTime)))
  13.     {
  14.        
  15.         $messages .= "Welcome New User";
  16.        
  17.     }
  18.     else
  19.     {
  20.         $messages .= 'Welcome Back, User. Last Login in was: $_SESSION['LastLogIn'] = $row['LastLoggedIn']';
  21.     }
  22. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement