add id when change question -> Changing a question is still not working

This commit is contained in:
Bertrand 2012-06-16 19:52:08 +02:00
parent 471a636641
commit f3af3ffc25
4 changed files with 9 additions and 5 deletions

View File

@ -33,7 +33,7 @@ $question = $fileQ->get_question($id);
<section id="introduction">
<article>
<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(); ?>
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>
<form id="formulaire" method="post" action="validateChangeQuestion.php">
<input type="hidden" name="id" id="id" value=<?php echo $question->getId() ?> />
<section id="Form">
<label for="course">De quelle matière s'agit-il ?</label><br/>

View File

@ -4,7 +4,7 @@
<head>
<meta charset="utf8" />
<link rel="Stylesheet" href="style.css" />
<title>Every AskWeb (BETA)</title>
<title>AskWeb (BETA)</title>
<script language="javascript">
var nbAnswer = 1;

View File

@ -41,7 +41,7 @@
<p>
Vous pouvez proposer de nouvelles questions en cliquant
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>
</article>
</section>

View File

@ -2,13 +2,15 @@
<?php
//error_reporting(E_ALL);
//error_reporting(E_ALL);
define("FILENAME", "questions_file.nemubot");
include("Question.class.php");
include("QuestionsFile.class.php");
echo "id" . $_POST['id'];
if (isset ($_POST['send']))
{
//Gets parameters: course, question and answers
@ -32,7 +34,7 @@ if (isset ($_POST['send']))
else
{
$file = new QuestionsFile('questions.xml');
$id = POST_['id'];
$id = $_POST['id'];
$quest = $file->get_question($id);
$quest->setCourse($couse);
$quest->setQuestion($question);