<?php


if ($_SERVER['REQUEST_METHOD'] == "POST") {
   $fUsername = escape_string ($_POST['fUsername']);
   $fPassword = escape_string ($_POST['fPassword']);

   if(autentica($_POST['fUsername'], $_POST['fPassword'])) {
      session_start();
      $_SESSION['sessid']['passwd'] = $fPassword;
      $_SESSION['sessid']['username'] = $fUsername;
   }
   else {
         $error = 1;
         $tMessage = '<span class="error_msg">Errore</span>';
         $tUsername = $fUsername;
         include ("userlogin.php");
         exit;
   }
}
?>
