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.

57 lines
2.2 KiB

<link rel="stylesheet" href="css/VueAdmin.css">
<form style="border:1px solid #ccc" method="GET" action="AjoutQuestion.php">
<div class="container">
<?php require_once('../BDD/SqliteDb.php');
require_once('../BDD/OracleDb.php');
$db = new SqliteDb();
$stmt = $db->prepare('SELECT question,reponse FROM Correct WHERE numQuestion= ? AND numTp = ?');
$stmt->bindParam(1, $_GET['numQuestion']);
$stmt->bindParam(2, $_GET['numTp']);
$resultQuestion = $stmt->execute();
$questionRow = $resultQuestion->fetchArray();
echo 'AAAAAAAAAAAAAAAA'.$_GET['numTp'].$questionRow['reponse'];
?>
<h1>Ajouter une question</h1>
<hr>
<label><b>TP n° : </b></label>
<input type="text" placeholder="Numéro du TP" name="tp" value="<?php echo $_GET['numTp']; ?>" required>
<label><b>Numéro de question : </b></label>
<input type="text" placeholder="Saisir le numéro de question..." name="num" value="<?php echo $_GET['numQuestion']; ?>" required>
<label><b>Barème : </b></label>
<input type="text" placeholder="Barème..." name="points" required>
<label><b>Consigne : </b></label>
<input type="text" placeholder="Ecrire la consigne..." name="consigne" value="<?php echo $questionRow['question']; ?>" required>
<label><b>Réponse : </b></label>
<input type="text" placeholder="SELECT ..." name="reponse" value="<?php echo $questionRow['reponse']; ?>" required>
<label> <b>Choisir le type de la question : </b><br/>
<input type="radio" name="type" value="requete" style="margin-bottom:15px" checked> requête simple
<input type="radio" name="type" value="fonction" style="margin-bottom:15px"> fonction
</label><br/>
<label><b>Verification avec BDD aléatoire? </b><br/>
<input type="radio" name="aleatoire" value="o" style="margin-bottom:15px"> oui
<input type="radio" name="aleatoire" value="n" style="margin-bottom:15px" checked> non
</label><br/>
<label><b>Base de données conçernée </b><br/>
<input type="radio" name="bdd" value="o" style="margin-bottom:15px" checked> NBA
</label>
<input type="hidden" name="modif" value="modif" >
<div class="clearfix">
<button type="submit" class="btnvalider"> Valider</button>
</div>
</div>
</form>