codebeater - Beta Launch #10

Merged
5803025047 merged 103 commits from dev into main 2025-12-15 11:20:48 -05:00
3 changed files with 3 additions and 3 deletions
Showing only changes of commit e1af8fc497 - Show all commits

View File

@ -114,5 +114,4 @@ function postScore(score){
.then(t => console.log("Server response:", t))
.catch(err => console.error("Fetch error:", err));
}
startQuiz()

1
src/js/soal.js Normal file
View File

@ -0,0 +1 @@
dadad

View File

@ -12,14 +12,14 @@ if (!isset($data['score'])) {
}
$score = (int)$data['score'];
$user_id = isset($_SESSION['user_id']) ? (int)$_SESSION['user_id'] : null;
$user_id = isset($_SESSION['id']) ? (int)$_SESSION['id'] : null;
if (!$user_id) {
echo json_encode(["error" => "no session user"]);
exit;
}
$stmt = $db->prepare("INSERT INTO scores (user_id, score) VALUES (?, ?)");
$stmt = $db->prepare("INSERT INTO scores (id, score) VALUES (?, ?)");
$stmt->bind_param("ii", $user_id, $score);
if ($stmt->execute()) {