From 6dd711bf2691116a5101b86f30ad6d1f425e1647 Mon Sep 17 00:00:00 2001 From: nathan boileau Date: Fri, 25 Nov 2022 19:06:57 +0100 Subject: [PATCH] ddd --- WEB/index.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/WEB/index.php b/WEB/index.php index aaa7f75a..dc8dd0e8 100644 --- a/WEB/index.php +++ b/WEB/index.php @@ -6,6 +6,13 @@ Autoload::charger(); $db = new Connection(); //Insert a new user in the database $db->exec('INSERT INTO Utilisateur VALUES ("e","e","e", false)'); +$stm=$db->prepare("INSERT INTO Utilisateur VALUES (:email, :password, :pseudo, :admin)"); +$stm->bindValue(':email', "e",SQLITE3_TEXT); +$stm->bindValue(':password', "e" ,SQLITE3_TEXT); +$stm->bindValue(':pseudo', "e", SQLITE3_TEXT); +$stm->bindValue(':admin', 0, SQLITE3_INTEGER); +$stm->execute(); + //Select all users in the database $res = $db->query('SELECT * FROM Utilisateur'); while ($row = $res->fetchArray(SQLITE3_ASSOC)) {