Advertisement
Guest User

Untitled

a guest
May 8th, 2018
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.69 KB | None | 0 0
  1. <?php
  2. include_once('User.php');
  3.  
  4. if(isset($_POST['submit']) OR isset($_POST['next']) OR isset($_POST['previous'])){
  5.     $username = $_POST["user"];
  6.     $password = $_POST["pass"];
  7.  
  8.     $object = new User();
  9.     $object->username= $username;
  10.     $object->Password=$password;
  11.     if( $object->isAuthenticated() ){
  12.  
  13.       echo "User Verified . <br><br>";
  14.      
  15.       $start = 0;
  16.      
  17.       if(isset($_POST['next'])) {
  18.           if(isset($_POST['start'])){
  19.              $start = $_POST['start'];
  20.           }
  21.       }
  22.       else if(isset($_POST['previous'])) {
  23.         $start = $_POST['start'] - 2;
  24.         if($start < 0) {
  25.             $start = 0;
  26.         }
  27.       }
  28.  
  29.       $object->getBooks($start);
  30.  
  31.     }
  32. }
  33. else{
  34.   echo "Wrong User Name Or Password . <br>";
  35. }
  36.  
  37.  
  38. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement