Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on May 7th, 2012  |  syntax: None  |  size: 0.98 KB  |  views: 37  |  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. require_once('inc/formClass.php');
  3. require_once('inc/userClass.php');
  4.  
  5. $user = new User;
  6. session_start();
  7. if(!isset($_SESSION['user'])){
  8.     /*if(isset($_POST['submitted'])){
  9.                 $status = $user->logIn($_POST['username'], $_POST['password']);
  10.         if(!$status){
  11.             print "Log In Failed";
  12.         }
  13.         else{
  14.             print "<a href='index.php'>Log In Successful</a>";
  15.         }
  16.     }
  17.     else{  
  18.         $form = new Forms;
  19.         $form->newForm('post', 'index.php');
  20.         $form->newInput('text', 'username', 'username', '', 'Username');
  21.         print '<br />';
  22.         $form->newInput('password', 'password', 'password', '', 'Password');
  23.         print '<br />';
  24.         $form->newInput('hidden', 'submitted');
  25.         $form->newInput('submit', 'submit', '', '', 'Login');
  26.         $form->endForm();
  27.         print "<a href='register.php'>Don't have an account? Register now</a>";
  28.     }
  29.     */}
  30. else{
  31.     header('Location: index.php');
  32. }
clone this paste RAW Paste Data