Show sourcecode
The following files exists in this folder. Click to view.
webbsrvprg/exercises/repetition/
hemligheter.php
repetition.php
repetition1.php
repetition2.php
repetition3.php
repetition3_medel.php
repetition4.php
repetition5.php
repetition6.php
repetition7.php
repetition8.php
repetition4.php
43 lines UTF-8 Windows (CRLF)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Repetition</title>
</head>
<body>
<?php
if (isset($_GET["namn"]) && isset($_GET["mat"])) {
echo "Hej ".$_GET["namn"]."! Du gillar ".$_GET["mat"]."!";
} else {
echo '
<form method="GET" action="">
<input type="text" name="namn" placeholder="Namn">
<br>
<br>
<p style="margin-bottom:0;">Maträtt:</p>
<input type="radio" name="mat" id="bolognese" value="Spaghetti Bolognese">
<label for="bolognese">Spaghetti Bolognese</label>
<br>
<input type="radio" name="mat" id="pannkakor" value="Pankakor">
<label for="pannkakor">Pankakor</label>
<br>
<input type="radio" name="mat" id="sill" value="Sill med kokt potatis">
<label for="sill">Sill med kokt potatis</label>
<br>
<br>
<br>
<input type="submit" value="Skicka">
</form>
';
}
?>
</body>
</html>