Add: php server files for timer
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
header('Content-Type: application/json');
|
||||
|
||||
$maestro_id = $_POST["MaestroID"];
|
||||
$player_id = $_POST["PlayerID"];
|
||||
$start_time = $_POST["StartTime"];
|
||||
// echo $maestro_id." / ".$player_id;
|
||||
|
||||
include "./../lib/send_reply_json.php";
|
||||
include "./../setup/connect_db.php";
|
||||
|
||||
|
||||
update_start_time($maestro_id, $player_id, $start_time);
|
||||
|
||||
send_result_success();
|
||||
exit;
|
||||
|
||||
|
||||
|
||||
function update_start_time($maestro_id, $player_id, $start_time) {
|
||||
global $db_conn;
|
||||
|
||||
$query = "
|
||||
UPDATE license_time
|
||||
SET StartTime = ?
|
||||
WHERE MaestroID = ? AND PlayerID = ?
|
||||
";
|
||||
$stmt = $db_conn->prepare($query);
|
||||
$stmt->bind_param('iii', $start_time, $maestro_id, $player_id);
|
||||
$stmt->execute();
|
||||
}
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user