master
pisouvigne 5 years ago
parent 47816715f5
commit 8ae1e1089c

@ -0,0 +1,25 @@
<?php
$mysqli = new mysqli("localhost", "root", "", "makeittrue");
if($mysqli->connect_error) {
exit('Could not connect');
}
$sql = "SELECT pseudo, score, id FROM score";
$stmt = $mysqli->prepare($sql);
$stmt->execute();
$stmt->store_result();
$stmt->bind_result($pseudo, $score, $id);
$stmt->fetch();
$stmt->close();
echo "<table>";
echo "<tr>";
echo "<th>CustomerID</th>";
echo "<td>" . $pseudo . "</td>";
echo "<th>CompanyName</th>";
echo "<td>" . $score . "</td>";
echo "<th>ContactName</th>";
echo "<td>" . $id . "</td>";
echo "</table>";
?>

@ -223,6 +223,7 @@
<script src="js/main.js"></script>
<script src="js/creator.js"></script>
<script src="js/timer.js"></script>
<script src="js/db.js"></script>
<script>
initAll();

@ -0,0 +1,11 @@
function getTest() {
var xhttp;
xhttp = new XMLHttpRequest();
xhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
document.getElementById("txtHint").innerHTML = this.responseText;
}
};
xhttp.open("GET", "../database/insert.php", true);
xhttp.send();
}
Loading…
Cancel
Save