diff --git a/create.php b/addQuestion.php similarity index 100% rename from create.php rename to addQuestion.php diff --git a/config.php b/config.php index 35f1f3a..6ee8291 100644 --- a/config.php +++ b/config.php @@ -87,3 +87,13 @@ function getData($table, $offset) } $departments = getData('departments', 3); $subjects = getData('subjects', 5); + +function getSubjectName($code) +{ + global $subjects; + foreach ($subjects as $subject) { + if ($subject[2] == $code) { + return $subject[1]; + } + } +} diff --git a/index.php b/index.php index c757eaa..9aaf546 100644 --- a/index.php +++ b/index.php @@ -194,17 +194,24 @@