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.
30 lines
817 B
30 lines
817 B
<?php
|
|
|
|
session_start();
|
|
require_once('../BDD/SqliteDb.php');
|
|
require_once('../BDD/OracleDb.php');
|
|
$db = new SqliteDb('o');
|
|
|
|
$oracleDb = new OracleDb();
|
|
$conn = $oracleDb->getConn();
|
|
|
|
|
|
$query = $db->prepare('SELECT numReponse FROM QcmCorrection WHERE numQuestion=?');
|
|
$query->bindParam(1, $_GET['numQuestion']);
|
|
$result = $query->execute();
|
|
$numReponseRow = $result->fetchArray();
|
|
|
|
$reponseQuery = $db->prepare('SELECT reponse FROM QcmReponse WHERE numReponse=? AND numQuestion=?');
|
|
$reponseQuery->bindParam(1, $numReponseRow['numReponse']);
|
|
$reponseQuery->bindParam(2, $_GET['numQuestion']);
|
|
$reponseResult = $reponseQuery->execute();
|
|
$reponseRow = $reponseResult->fetchArray();
|
|
|
|
if($_GET['textbox'] == $reponseRow['reponse']){
|
|
echo 'Bonne réponse !';
|
|
}
|
|
else echo $reponseRow['reponse'].'Mauvaise Réponse.';
|
|
|
|
|
|
|