????
| Current Path : /home/carpe/public_html/sae 202/ |
| Current File : /home/carpe/public_html/sae 202/quiz.php |
<div>
<?php
if(!isset($_POST['send']) and !isset($_POST['send2'])){
echo "<form action='quiz.php' method='post'>
<label>Question 1 : Pipi ou caca ?</label>
<label>Pipi</label>
<input type='radio' name='pc' value='pipi'>
<label>Caca</label>
<input type='radio' name='pc' value='caca'>
<input type='submit' name='send'>
</form>";
}
if(isset($_POST['send'])){
$rep1 = $_POST['pc'];
echo "
<form action='quiz.php' method='post'>
<label>Question 2 : Prof préféré ? ?</label>
<input type='input' name='pp'>
<input type='hidden' name='rep1' value='".$rep1."'>
<input type='submit' name='send2'>
</form>
";
}
if(isset($_POST['send2'])){
$rep1 = $_POST['rep1'];
$rep2 = $_POST['pp'];
echo "
<form action='quiz.php' method='post'>
<label>Question 3 : Pire prof ouai ? ?</label>
<input type='input' name='pire_prof'>
<input type='hidden' name='rep1' value='".$rep1."'>
<input type='hidden' name='rep2' value='".$rep2."'>
<input type='submit' name='send3'>
</form>
";
}
if(isset($_POST['send3'])){
$rep1 = $_POST['rep1'];
$rep2 = $_POST['rep2'];
$rep3 = $_POST['pire_prof'];
echo $rep1;
echo $rep2;
echo $rep3;
}
?>
</div>