The error is with this code. You are binding the params to different query object.
$addTl = "UPDATE teams SET tlName = :tlName, tlSet = :tlSet WHERE tId = :tId";
$addTlQuery = $dbConnect -> prepare($addTl);
$addUserQuery -> bindParam(':tId', $_REQUEST["team"]);
$addUserQuery -> bindParam(':tlName', $lastUid);
$addUserQuery -> bindParam(':tlSet', $_REQUEST["tl"]);
echo $lastUid. " Last ID<br>";
echo $_REQUEST["tl"]. " TL<br>";
echo $_REQUEST["team"];
if ($addUserQuery -> execute()){
echo "1";
}else{
echo "11";
}
You need to update the $addUserQuery
to $addTlQuery
4
solved PDO Query throws a fatal error saying bound variables does not match number of tokens [closed]