Show sourcecode
The following files exists in this folder. Click to view.
Webbsrvprg/exercises/resultatsidor/
form1_result.php
form2_result.php
form3_result.php
form4_result.php
form5_result.php
form6_result.php
form6_result.php
34 lines UTF-8 Windows (CRLF)
<?php
$title = "form6_result.php";
include "../incl/header.php";
?>
<?php
$fnamn = htmlspecialchars($_POST["fnamn"]);
$enamn = htmlspecialchars($_POST["enamn"]);
$klass = htmlspecialchars($_POST["klass"]);
$mat = $_POST["mat"];
$amne = $_POST["amne"];
?>
<h1>Resultat Formulär 6</h1>
<p>Hej <?php echo "$fnamn $enamn i $klass"?></p>
<p>
<?php
$first = true;
if (count($mat) == 1 ) {
echo "Din favoritmaträtt är ";
}
else {
echo "Dina favoritmaträtter är ";
}
foreach ($mat as $dish) {
if (!$first) {
echo ", ";
};
echo "$dish";
$first = false;
};
?></p>
<p>Ditt favoritämne är <?php echo "$amne"?></p>
<?php include "../incl/footer.php" ?>