gymrooster_php/php/auth.php

17 lines
311 B
PHP

<?php
session_start();
function isAuthorized() {
require '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;
}
}