juddhumLe 23/03/2007 à 14:23
>";
}
?>En cours... <h1>Qui pour 2007 ? (yAronet Edition)</h1>
<?php
$questions=array(
array("Question 1",array("Rayponse 1","Réponse 2","Ruponse 3")),
array("Question 2",array("Rzponse 1","Réponse 2","Réponse 3")),
array("Question 3",array("Réponse 1","Réponse 2","Réponse 3")),
array("Question 4",array("Réponse 1","Réponse 2","Réponse 3")),
array("Question 5",array("Réponse 1","Réponse 2","Réponse 3")),
array("Question 6",array("Réponse 1","Réponse 2","Réponse 3"))
);
if(isset($_GET['action']) && $_GET['action']=="resultat") {
$reponses=array(
array("Ximoon",1,2,3,1,2,3),
array("montreuillois",3,2,1,3,2,1),
array("vince",1,1,1,1,1,1),
array("Budmilka",2,2,2,2,2,2),
array("Rintintin",3,3,3,3,3,3)
);
echo "<h2>Résultats</h2>";
for($i=1 ; $i<=count($questions) ; $i++) {
echo $i." : ".$_POST['q'.$i]."<br />";
}
} else {
echo "<form method=\"post\" action=\"?action=resultat\">";
$i=0;
foreach($questions as $question) {
$i++;
echo "<div><strong>".htmlentities($question[0])."</strong>";
echo "<p>";
$j=0;
foreach($question[1] as $q) {
$j++;
echo "<input type=\"radio\" name=\"q".$i."\" value=\"".$j."\"> ".$q."<br />";
}
echo "</p>";
echo "</div>";
}
echo "<p><input type=\"submit\" value=\"Envoye euhl'questionnaire et file-moi l'résu\"></p>";
echo "</form