Advertisement
Guest User

Untitled

a guest
Jul 15th, 2016
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.71 KB | None | 0 0
  1. require_once('lib/class.phpwsdl.php');
  2.     ini_set('soap.wsdl_cache_enabled',0);
  3.     PhpWsdl::$CacheTime=0;
  4.     if(isset($_SESSION["email"])) {
  5.         header('location: index.php');
  6.     }
  7.     if($_POST){
  8.         controllaLogin();
  9.     }
  10.     function controllaLogin(){
  11.         $username = $_POST["username"];
  12.         $password = $_POST["password"];
  13.         $wsdl = "http://localhost/SAED/lib/cache/server.wsdl";
  14.         $soap = new SoapClient($wsdl);
  15.         global $risposta;
  16.         $risposta = $soap->controlla_login($username,$password);
  17.         if($risposta[0] == "Login verificato!"){
  18.             session_start();
  19.             $_SESSION['email'] = $risposta[1];
  20.             $_SESSION['categoria'] = $risposta[2];
  21.             header('location: index.php');
  22.         }
  23.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement