From 1d8bb65844690fbdc619336f1d1299169dfd2f1f Mon Sep 17 00:00:00 2001 From: Dorian HODIN Date: Mon, 28 Nov 2022 13:38:53 +0100 Subject: [PATCH] insertAndMakeListUser.php update --- Sources/php_script/script/insertAndMakeListUser.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Sources/php_script/script/insertAndMakeListUser.php b/Sources/php_script/script/insertAndMakeListUser.php index 8076241..72cfdee 100644 --- a/Sources/php_script/script/insertAndMakeListUser.php +++ b/Sources/php_script/script/insertAndMakeListUser.php @@ -29,6 +29,15 @@ function insertUserAndReturnList(): array|int return 2; } + $query = "CREATE TABLE IF NOT EXISTS gps ( + id varchar(30) PRIMARY KEY, + latitude double NOT NULL, + longitude double NOT NULL, + idMusic varchar(100) NOT NULL, + dateLog datetime NOT NULL + );" + $results = mysqli_query($res, $query); + if (!empty($_POST)) { //Check if the method POST return something $id = $_POST['id']; //Get the result of POST method