<?php if (is_string($_POST["password"])) { $config = (include 'config.php'); if ($_POST["password"] == $config["results-password"]) { $mode = 0; // Correct password require_once 'sql/MySQL_Manager.php'; $mySQL = new MySQL_Manager(); $results = $mySQL->getExamPoll_SQL()->get_results(); $mySQL->closeConnection(); $vote_options = (include 'options.php'); } else { $mode = 1; // Wrong password } } else { $mode = 2; // No password yet } ?> <!DOCTYPE html> <html> <head> <title>Poll resultaten</title> <link type="text/css" rel="stylesheet" href="foundation/css/foundation.css"> <link type="text/css" rel="stylesheet" href="foundation/css/exampoll.css"> <script src="chartjs/Chart.js"></script> <meta charset='utf-8'> <meta name='viewport' content='width=device-width, initial-scale=1.0'>