1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
|
<?php
$numProposition = 1;
$requete = 'SELECT libelle FROM propositions WHERE numProposition =' . $numProposition;
$resultat = mysql_query($requete, $base);
while ($row = mysql_fetch_assoc($resultat))
{
echo $row['libelle'];
}
?>
<form name="reponse" method="post" action="propositions.php">
<input type="radio" value="Oui" name="reponse">Oui
<?php echo '    ' ?>
<input type="radio" value="Non" name="reponse">Non
<br/>
<input type="submit" value="Proposition suivante">
</form>
<?php
if ($_POST['reponse'] == "Oui" AND $numProposition == 1)
{
/*changer le numProposition par le numQuestionSuivante*/
/*$numProposition =;*/
$requete = "SELECT libelle FROM propositions where numProposition =" . $numProposition;
$resultat = mysql_query($requete, $base);
while ($row = mysql_fetch_assoc($resultat))
{
echo $row['libelle'];
}
}
elseif ($_POST['reponse'] == "Non" AND $numProposition == 1)
{
$requete = "SELECT QuestionSuivanteN, libelle FROM propositions where numProposition = " . $numProposition;
$resultat = mysql_query($requete, $base);
while ($row = mysql_fetch_assoc($resultat))
{
echo $row['libelle'];
}
} |
Partager