2020-03-09 16:49:36 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
session_start();
|
|
|
|
|
|
|
|
function isAuthorized() {
|
|
|
|
|
2020-03-09 19:09:41 +01:00
|
|
|
require __DIR__ . '/conn.php';
|
2020-03-09 16:49:36 +01:00
|
|
|
|
|
|
|
$result = $conn->query("SELECT * FROM docenten WHERE username = '" . $_SESSION["username"] . "' AND password = '" . $_SESSION["password"] . "'");
|
|
|
|
|
|
|
|
if ($result->num_rows === 1) {
|
|
|
|
return true;
|
|
|
|
} else {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|