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?)