Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Apr 29th, 2012  |  syntax: PHP  |  size: 0.29 KB  |  hits: 11  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  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.                 $_SESSION['username'];
  12.         }
  13. else header(post.php);
  14. ?>