[code]
<html>
<body>
<?php
include('connect.php');
$ud_NUMB=(int)$_POST["fNumb"];
$ud_PAID=$_POST["fPaid"];
echo $ud_NUMB;
echo $ud_PAID;
$sql = "UPDATE Teams SET Paid = :paid
WHERE Numb = :numb";
$stmt = $db->prepare($sql);
$stmt->bindParam(':paid', $_POST['fPaid'], PDO::PARAM_STR);
$stmt->bindParam(':numb', $_POST['$fNumb'], PDO::PARAM_STR);
$stmt->execute();
echo "\nPDO::errorCode(): ";
print $stmt->errorCode();
?>
</br><p><a href='game.php'><H3>Back to main page</H3></a>
</body>
</html>
[/code]
My connect works fine, used in other scripts. $db is the connection. My echo of the two passed variables works fine.
Example reply from echo is: 8Yes (didn't bother to put in spaces). The only reply on error is: PDO::errorCode(): 00000
I get the prompt to return to the website link at the end. No other error codes.
But it does not update my record. It should change record with unique ID of 8 to show Yes in the Paid column.
Can someone point me in the right direction here?
Thanks