duelfi_api/add_game_history.php
2025-04-11 05:02:06 +08:00

24 lines
680 B
PHP

<?php
include('connection.php');
$conn = OpenCon();
$address= $_GET['address'];
$game = $_GET['game'];
$master_score = $_GET['master_score'];
$client_score = $_GET['client_score'];
$winner = $_GET['winner'];
$wager = $_GET['wager'];
$master_id = $_GET['master_id'];
$client_id = $_GET['client_id'];
$reward_tx = $_GET['reward_tx'];
$insertSql = "INSERT INTO Game_History (address,game, master_score, client_score, winner, wager, master_id, client_id, reward_tx) VALUES('$address', '$game', $master_score, $client_score, '$winner', $wager, '$master_id', '$client_id','$reward_tx')";
if(mysqli_query($conn,$insertSql)){
echo "0";
}else{
echo "-1";
}
CloseCon($conn);
?>