diff --git a/Project/php/controller/TeacherController.php b/Project/php/controller/TeacherController.php
index e333e35..fb51a9c 100755
--- a/Project/php/controller/TeacherController.php
+++ b/Project/php/controller/TeacherController.php
@@ -59,16 +59,14 @@ class TeacherController extends UserController
global $user;
$id = $user->getId();
$mdl = new MdlTeacher();
- $userID = Validation::filter_int($_GET['userID'] ?? null);
$name = Validation::filter_str_simple($_GET['listName'] ?? null);
$words = array();
- for ($i = 0; $i <= 1; $i++) {
- $frenchWord = Validation::filter_str_simple($_GET['frenchWord'.$i] ?? null);
- $englishWord = Validation::filter_str_simple($_GET['englishWord'.$i] ?? null);
+ $frenchWord = Validation::filter_str_simple($_GET['frenchWord'] ?? null);
+ $englishWord = Validation::filter_str_simple($_GET['englishWord'] ?? null);
$words[] = array($frenchWord, $englishWord);
- }
- var_dump($words);
- $mdl->addVocabList($userID, $name, "", $words);
- echo $twig->render('addVocabList.html', [ 'userId' => $id ]);
+ var_dump($words);
+ $addvoc= $mdl->addVocabList($id, $name, "", $words);
+ echo $twig->render('manageVocabListView.html', [ 'vocabularies' => $addvoc ,'userId' => $id]);
}
+
}
\ No newline at end of file
diff --git a/Project/php/templates/manageVocabListView.html b/Project/php/templates/manageVocabListView.html
index 3fe2ddf..474b395 100755
--- a/Project/php/templates/manageVocabListView.html
+++ b/Project/php/templates/manageVocabListView.html
@@ -38,7 +38,7 @@