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 39 40 41 42 43 44 45 46 47
| <body>
<center>
<p><strong>Question n°</strong><?php echo $row_Recordset3['NumeroQuestion'];?></p>
<p align="left"><strong>
<?php echo $row_Recordset3['intitule']; ?> </strong></p>
</center>
<p align="left">
<?php if( $row_Recordset3['reponsepossible1']!==""){?>
<input type="checkbox" name="cb1">
<?php echo $row_Recordset3['reponsepossible1'];} ?>
</p>
<p align="left">
<?php if( $row_Recordset3['reponsepossible2']!==""){?>
<input type="checkbox" name="cb2">
<?php echo $row_Recordset3['reponsepossible2'];} ?>
</p>
<p align="left">
<?php if( $row_Recordset3['reponsepossible3']!==""){?>
<input type="checkbox" name="cb3">
<?php echo $row_Recordset3['reponsepossible3'];} ?>
<p align="left">
<?php if( $row_Recordset3['reponsepossible4']!==""){?>
<input type="checkbox" name="cb4">
<?php echo $row_Recordset3['reponsepossible4'];} ?></p>
<p align="left">
<?php if( $row_Recordset3['reponsepossible5']!==""){?>
<input type="checkbox" name="cb5">
<?php echo $row_Recordset3['reponsepossible5'];} ?></p>
<p></p>
<?php
$bonnereponse1 = isset($_POST["cb1"]) ? 1 : 0;
$bonnereponse2 = isset($_POST["cb2"]) ? 1 : 0;
$bonnereponse3 = isset($_POST["cb3"]) ? 1 : 0;
$bonnereponse4 = isset($_POST["cb4"]) ? 1 : 0;
$bonnereponse5 = isset($_POST["cb5"]) ? 1 : 0;?>
<a href="#" onclick="if (window.confirm('Voulez vous vraiment passer à la question suivante?'))
{
<?php $sql1 = "insert into reponse (Questionnaire,Question,CHK1,CHK2,CHK3,CHK4,CHK5 ) values ('".$_GET['NumeroQuestionnaire']."',1,'$bonnereponse1','$bonnereponse2','$bonnereponse3','$bonnereponse4','$bonnereponse5')";
$q1 = mysql_query($sql1,$connexionreponse) or die(mysql_error());?>
location.href='QUESTIONSUIVANTE.php?questionnaire=<?php echo $row_Recordset3["questionnaire"];?>&NumeroQuestion= <?php echo $row_Recordset3["NumeroQuestion"];?>';return true;} else {return false;}"><img src="flechedroite.png" width="50" height="50" align="right"></a>
</body>
</html> |
Partager