Primo import
This commit is contained in:
21
core/auth.php
Executable file
21
core/auth.php
Executable file
@@ -0,0 +1,21 @@
|
||||
<?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;
|
||||
}
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user