gymrooster_php/php/auth.php

17 lines
322 B
PHP
Raw Normal View History

<?php
session_start();
function isAuthorized() {
2020-03-09 19:09:41 +01:00
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;
}
}