add id when change question -> Changing a question is still not working
This commit is contained in:
parent
471a636641
commit
f3af3ffc25
@ -33,7 +33,7 @@ $question = $fileQ->get_question($id);
|
|||||||
<section id="introduction">
|
<section id="introduction">
|
||||||
<article>
|
<article>
|
||||||
<h2>Dernière chance pour changer d'avis</h2>
|
<h2>Dernière chance pour changer d'avis</h2>
|
||||||
Voici le rappel de votre question :<br/>
|
Voici le rappel de votre question :<br/><br/>
|
||||||
<?php $question->print_test(); ?>
|
<?php $question->print_test(); ?>
|
||||||
|
|
||||||
Vous avez la possibilité de modifier votre question avant de la
|
Vous avez la possibilité de modifier votre question avant de la
|
||||||
@ -44,6 +44,8 @@ $question = $fileQ->get_question($id);
|
|||||||
<h2>Modifier la question...</h2>
|
<h2>Modifier la question...</h2>
|
||||||
<form id="formulaire" method="post" action="validateChangeQuestion.php">
|
<form id="formulaire" method="post" action="validateChangeQuestion.php">
|
||||||
|
|
||||||
|
<input type="hidden" name="id" id="id" value=<?php echo $question->getId() ?> />
|
||||||
|
|
||||||
<section id="Form">
|
<section id="Form">
|
||||||
<label for="course">De quelle matière s'agit-il ?</label><br/>
|
<label for="course">De quelle matière s'agit-il ?</label><br/>
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
<head>
|
<head>
|
||||||
<meta charset="utf8" />
|
<meta charset="utf8" />
|
||||||
<link rel="Stylesheet" href="style.css" />
|
<link rel="Stylesheet" href="style.css" />
|
||||||
<title>Every AskWeb (BETA)</title>
|
<title>AskWeb (BETA)</title>
|
||||||
|
|
||||||
<script language="javascript">
|
<script language="javascript">
|
||||||
var nbAnswer = 1;
|
var nbAnswer = 1;
|
||||||
|
@ -41,7 +41,7 @@
|
|||||||
<p>
|
<p>
|
||||||
Vous pouvez proposer de nouvelles questions en cliquant
|
Vous pouvez proposer de nouvelles questions en cliquant
|
||||||
sur le lien ci-dessous.<br/>
|
sur le lien ci-dessous.<br/>
|
||||||
<a href="index.html">Proposer une nouvelle question</a>
|
<a href="index.php">Proposer une nouvelle question</a>
|
||||||
</p>
|
</p>
|
||||||
</article>
|
</article>
|
||||||
</section>
|
</section>
|
||||||
|
@ -2,13 +2,15 @@
|
|||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
//error_reporting(E_ALL);
|
//error_reporting(E_ALL);
|
||||||
define("FILENAME", "questions_file.nemubot");
|
define("FILENAME", "questions_file.nemubot");
|
||||||
|
|
||||||
|
|
||||||
include("Question.class.php");
|
include("Question.class.php");
|
||||||
include("QuestionsFile.class.php");
|
include("QuestionsFile.class.php");
|
||||||
|
|
||||||
|
echo "id" . $_POST['id'];
|
||||||
|
|
||||||
if (isset ($_POST['send']))
|
if (isset ($_POST['send']))
|
||||||
{
|
{
|
||||||
//Gets parameters: course, question and answers
|
//Gets parameters: course, question and answers
|
||||||
@ -32,7 +34,7 @@ if (isset ($_POST['send']))
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
$file = new QuestionsFile('questions.xml');
|
$file = new QuestionsFile('questions.xml');
|
||||||
$id = POST_['id'];
|
$id = $_POST['id'];
|
||||||
$quest = $file->get_question($id);
|
$quest = $file->get_question($id);
|
||||||
$quest->setCourse($couse);
|
$quest->setCourse($couse);
|
||||||
$quest->setQuestion($question);
|
$quest->setQuestion($question);
|
||||||
|
Reference in New Issue
Block a user