You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
SAE4.01_FORMULAIRE/Source/Views/HTML/form.php

58 lines
2.0 KiB

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@300&display=swap" rel="stylesheet">
<title>Formulaire de témoignage</title>
</head>
<body>
<!-- La barre bleue située en tête de page -->
<img id="logoUCA" src="https://cdn.uca.fr/images/logos/logo_uca_mini_light.png" height="35px">
<h1>Votre témoignage nous intéresse !</h1>
<!-- L'intégralité du formulaire de témoignage -->
<form id="container_form">
<?php
$content = "Est-ce que tu aimes l'IUT ?";
$printStrategy = "<label>$content</label>
<select name='answers[]'>
<option value='Yes' selected>Yes</option>
<option value='No'>No</option>
</select>";
$content2 = "Parles nous rapidement de ce que l'IUT t'as apporté";
$printStrategy2 = "<label>$content2</label>
<input type='text' name='answers[]' />";
$possibleResponses = array("BAC Pro", "BAC Général Scientifique", "BAC général Éco");
$categories = array("Pro", "Scientifique", "Éco");
$content3 = "Séléctionnez votre cursus :";
$printStrategy3 = "<div id='question'>
<label>$content3</label>
<select name='answers[]'>";
for($i = 0; $i < count($possibleResponses); $i++)
{
$printStrategy3.= "<option value='$categories[$i]'>$possibleResponses[$i]</option>";
}
$printStrategy3.= "</select>
</div>";
echo $printStrategy."\n";
echo $printStrategy2."\n";
echo $printStrategy3."\n";
?>
</form>
</body>
</html>