From 6885c2883c44b30be102a4f5fdded6ca51d51789 Mon Sep 17 00:00:00 2001 From: Bertrand Cournaud Date: Tue, 22 May 2012 10:00:59 +0200 Subject: [PATCH] write in file --- questions.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/questions.php b/questions.php index 128f55a..c0270b7 100755 --- a/questions.php +++ b/questions.php @@ -3,6 +3,7 @@ define("FILENAME", "questions_file.nemubot"); include("Question.class.php"); +include("QuestionsFile.php"); if (isset ($_POST['send'])) { @@ -30,6 +31,9 @@ if (isset ($_POST['send'])) $quest->print_test(); // @TODO: Create/Load a QuestionFile and add the question (it must be unique) + $file = new QuestionsFile('questions.xml'); + $file->add_question($quest); + $file->save(); // @TODO: Find a validator (from the list of previous senders for example?)