18 lines
469 B
PHP
Executable File
18 lines
469 B
PHP
Executable File
<?php
|
|
|
|
session_start();
|
|
|
|
require 'conn.php';
|
|
|
|
$result = $conn->query("SELECT * FROM docenten WHERE username = '" . $_SESSION['username'] . "';");
|
|
|
|
$docent = $result->fetch_assoc();
|
|
|
|
if (isset($_GET['date'])) {
|
|
$date = date("Y-m-d", strtotime($_GET['date']));
|
|
} else {
|
|
$date = date("Y-m-d"); // Create date in mysql DATE format.
|
|
}
|
|
|
|
$rooster = $conn->query("SELECT * FROM rooster WHERE docent = " . $docent['id'] . " AND dag = DATE('" . $date . "')")->fetch_assoc();
|