17 lines
322 B
PHP
17 lines
322 B
PHP
<?php
|
|
|
|
session_start();
|
|
|
|
function isAuthorized() {
|
|
|
|
require __DIR__ . '/conn.php';
|
|
|
|
$result = $conn->query("SELECT * FROM docenten WHERE username = '" . $_SESSION["username"] . "' AND password = '" . $_SESSION["password"] . "'");
|
|
|
|
if ($result->num_rows === 1) {
|
|
return true;
|
|
} else {
|
|
return false;
|
|
}
|
|
}
|