WebbServerProg/www/public/Moment-0/evaluate.php

30 lines
646 B
PHP
Raw Normal View History

2024-08-23 13:56:58 +00:00
<!doctype html>
<html>
<head lang="sv"></head>
<body>
<h1>Matematiktest</h1>
<h2>Resultat</h2>
<?php
$ans1 = $_POST['q1'];
$ans2 = $_POST['q2'];
2024-08-26 06:41:08 +00:00
$ans3 = $_POST['q3'];
$ans4 = $_POST['q4'];
2024-08-23 13:56:58 +00:00
$ans5 = $_POST['q5'];
$points = 0;
$namn = $_POST['namn'];
if($ans1 == 9)
$points++;
if($ans2 == 15)
$points++;
if($ans3 == 3)
$points++;
if($ans4 == 2)
$points++;
if($ans5 == 21)
$points++;
echo("<p>Du fick " . $points . " av 5 möjliga ".$namn."</p>");
include("../footer.html");
?>
</body>
</html>