diff --git a/html.php b/html.php
index 184b4bc..c7d694a 100644
--- a/html.php
+++ b/html.php
@@ -28,6 +28,17 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['bank_method'])) {
$topup_success = true;
}
}
+
+// Handle balance update from game
+if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['update_balance'])) {
+ $new_balance = (int)$_POST['update_balance'];
+ if ($new_balance >= 0) {
+ $_SESSION['balance'] = $new_balance;
+ header('Content-Type: application/json');
+ echo json_encode(['status' => 'success', 'balance' => $_SESSION['balance']]);
+ exit;
+ }
+}
?>
@@ -371,12 +382,13 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['bank_method'])) {
-
+
+