Advertisement
Guest User

Untitled

a guest
May 30th, 2017
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.44 KB | None | 0 0
  1. <?php
  2.  
  3. include_once './includes/adLDAP.php';
  4.  
  5. if( $_SERVER['REQUEST_METHOD'] == 'POST' ) {
  6.  
  7.         $username = htmlspecialchars( $_POST['username'] );
  8.         $password = htmlspecialchars( $_POST['password'] );
  9.        
  10.         $adldap = new adLDAP();
  11.        
  12.                 $authUser = $adldap->authenticate($username, $password);
  13.             if ($authUser) {
  14.               echo "User authenticated successfully";
  15.             }
  16.             else {
  17.               echo "User authentication unsuccessful";
  18.             }
  19. }
  20.  
  21. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement