made game ready for presentation and cloned a version with changed phase durations for presentation
This commit is contained in:
19
webdev/js/Database.js
Normal file
19
webdev/js/Database.js
Normal file
@@ -0,0 +1,19 @@
|
||||
class database{
|
||||
sendData(naam, score) {
|
||||
fetch(`https://oege.ie.hva.nl/~hossan/postData.php?name=${naam}&score=${score}`)
|
||||
}
|
||||
|
||||
getData(naam) {
|
||||
// Fetch data from the database, put it in an array, and log it to the console
|
||||
//met backticks als " " kan je variabelen in een string zetten
|
||||
return fetch(`https://oege.ie.hva.nl/~hossan/getData.php?name=${naam}`) // Add return here
|
||||
.then(response => response.json())
|
||||
.then(data => {
|
||||
requesteddata = data;
|
||||
console.log(data);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user