Skip to content

Instantly share code, notes, and snippets.

@Tiefseetauchner
Created March 5, 2020 18:09
Show Gist options
  • Save Tiefseetauchner/501bc4492397715a5de1ac5d5f564b1e to your computer and use it in GitHub Desktop.
Save Tiefseetauchner/501bc4492397715a5de1ac5d5f564b1e to your computer and use it in GitHub Desktop.
$userQuery = $pdo->prepare('SELECT pk_userid FROM users where username = :username');
$userQuery->execute($_SESSION);
$userid = $userQuery->fetchAll();
var_dump($userid);
$writeUser = $pdo->prepare('update users set bestQuizPoints = :points where username = :username');
$writeUser->execute(["username" => $_SESSION["username"], "points" => $points]);
echo "<br>reached " . $_SESSION["username"] . " " . $points;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment