Untitled

From Anonymous, 3 Years ago, written in Plain Text, viewed 87 times.
URL https://paste.bugabuse.net/view/16173209 Embed
Download Paste or View Raw
  1. <?php
  2. // Inialize session
  3. session_start();
  4.  
  5. // Check, if user is already login, then jump to post
  6. if (isset($_SESSION['username'])) {
  7. header('Location: post.php');
  8. }
  9. if($_GET['username'] == 'guest' && $_GET['password'] == '1234')
  10.         {
  11.                 echo "Username and password correct";
  12.                 $_SESSION['username'];
  13.         }
  14. else {
  15. echo "Error!";
  16. exit;
  17. }
  18. ?>

Reply to "Untitled"

Here you can reply to the paste above