File manager - Edit - /home/ipsc/api/save_event.php
Back
<?php require_once "../connection.php"; $player_count = intval($_POST['player_count'] ?? 0); $target_count = intval($_POST['target_count'] ?? 0); if ($player_count <= 0 || $target_count <= 0) { echo json_encode(["success"=>false,"message"=>"ข้อมูลไม่ถูกต้อง"]); exit; } $stmt = $conn->prepare(" UPDATE event SET player_count=?, target_count=? WHERE id=1 "); $stmt->bind_param("ii", $player_count, $target_count); $stmt->execute(); echo json_encode([ "success"=>true, "message"=>"บันทึกข้อมูลการแข่งขันเรียบร้อย" ]);
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Generation time: 0.39 |
proxy
|
phpinfo
|
Settings