PHP PDO Help STEAM

Im trying to make this work:

Here is my code so far:

This inserts there stuff into the database / updates it

$stmt = $conn->prepare(“INSERT INTO users (64ID, BALANCE, AMOUNTBET) VALUES (:_64id, :balance, :amountbet)”);

$_64id = $steamprofile[‘steamid’];
$balance = “”;
$amountbet = “”;

$stmt->bind_param(:_64id, $_64id);
$stmt->bind_param(:balance, $balance);
$stmt->bind_param(:amountbet, $amountbet);
$stmt->execute();

But how would i make it so when they add money it updates and checks there 64id and if it equals to the one there logged in as it gets there balance in the same row as there $_64id and outputs it onto the page in a html element?

assuming from the method name that you’re using mysqli, the call to bind_param() is completely wrong.

assuming from the placeholders that you’re using PDO, you have the wrong method name.

additionally, you’re missing the string delimiters for the PHP strings and the DB error handling.

in the end, no matter which DB extension you’re using, your code should exit with a fatal error.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.