From ef33e787a4a243cfe93463f976d2b5aaf32199e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?N=C3=A9munaire?= Date: Fri, 18 May 2012 22:50:06 +0200 Subject: [PATCH] Fix HTML balises order; add basic checks --- index.html | 51 +++++++++++++++++++++++++-------------------------- questions.php | 15 +++++++++++---- 2 files changed, 36 insertions(+), 30 deletions(-) diff --git a/index.html b/index.html index a47aa16..62442cc 100644 --- a/index.html +++ b/index.html @@ -4,30 +4,29 @@ Every Questions - - - -
-
-

Nemubot Questions

-
-
- -
-

- - -

-

- - -

-

- -

-
- - - + + +
+
+

Nemubot Questions

+
+
+ +
+

+ + +

+

+ + +

+

+ +

+
+ + + diff --git a/questions.php b/questions.php index 0b29071..0e9bc42 100755 --- a/questions.php +++ b/questions.php @@ -2,11 +2,18 @@ if (isset ($_POST['send'])) { - $question=$_POST['question']; - $answer=$_POST['answer']; + if (empty($_POST['question']) || empty($_POST['answer'])) + { + echo "Il manque la question ou la réponse !"; + } + else + { + $question = $_POST['question']; + $answer = $_POST['answer']; - echo 'La question est : ' . $question . "
"; - echo 'La réponse est : ' . $answer; + echo 'La question est : ' . $question . "
"; + echo 'La réponse est : ' . $answer; + } } ?>