Skip to content
  • P
    Projects
  • G
    Groups
  • S
    Snippets
  • Help

alsunj / blackjack

  • This project
    • Loading...
  • Sign in
Go to a project
  • Project
  • Repository
  • Issues 0
  • Merge Requests 0
  • Pipelines
  • Wiki
  • Snippets
  • Members
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Files
  • Commits
  • Branches
  • Tags
  • Contributors
  • Graph
  • Compare
  • Charts
Commit c9c2c245 authored 2 years ago by alsunj's avatar alsunj
Browse files
Options
  • Browse Files
  • Download
  • Email Patches
  • Plain Diff

Upload New File

parent 1f8a27f5
Hide whitespace changes
Inline Side-by-side
Showing with 26 additions and 0 deletions
  • scripts/htdocs/save.php
scripts/htdocs/save.php 0 → 100644
View file @ c9c2c245
<?php
$con = mysqli_connect('localhost', 'root','root', 'unity', '3306');
if(mysqli_connect_errno())
{
echo "1";
exit();
}
//unityst saadud tulemused
$username = $_POST['username'];
$bank = $_POST['bank'];
$loses = $_POST['loses'];
$wins = $_POST['wins'];
//päring mis sisestab tabelisse users uue pangaseisu kindlale sisselogitud kasutajale
$updateuserquery = "UPDATE users SET bank = '$bank' WHERE username = '$username';";
mysqli_query($con, $updateuserquery) or die("4: ei saa kasutajat lisada");
//päring mis sisestab tabelisse player uued streakid (kaotused, võidud), samamoodi sisselogitud kasutajale.
$insertuserquery = "UPDATE player SET loses = '$loses' + loses, wins = '$wins' + wins WHERE username = '$username';";
mysqli_query($con, $insertuserquery) or die("5: streakid");
echo("0");
?>
\ No newline at end of file
This diff is collapsed. Click to expand it.
  • Write
  • Preview
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment