Show sourcecode
The following files exists in this folder. Click to view.
webbserverprogrammering/projects/anton-quiz/admin/
create_answer.php
create_question.php
create_quiz.php
dashboard.php
edit_quiz.php
show_results.php
view_details.php
create_question.php
33 lines UTF-8 Windows (CRLF)
<?php
session_start();
if (!$_SESSION["is_admin"]) {
header('Location: ../index.php');
die();
}
require_once __DIR__ . '/../dbconnect.php';
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<form action="../endpoints/admin/add_question.php" method="post">
<input type="hidden" name="test_id" value="<?php echo $_GET["test_id"];?>">
<label for="question">Lägg till fråga:</label>
<input type="text" name="question">
<button type="submit">Spara fråga</button>
</form>
</body>
</html>