有人可以帮助我找出为什么我在这段代码中得到500错误我是初学者

I'm getting an HTTP error 500, produced by the code below:

else if ($_POST['submit'] == "button2") {
    $tbVraag = $_POST['tbVraag'];
    $tbText = $_POST['tbText'];
    $tbQuestId = $_POST['tbQuestId'];


    $UpdateQuest = "UPDATE Vragen SET Title=:Title, `Text`=:txt WHERE QuestionId=:QuestionId";
    $stmt = $dbQuiz->prepare($UpdateQuest);

    $stmt->bindparam(':Title', $tbVraag);
    $stmt->bindparam(':txt', $tbText);
    $stmt->bindparam(':QuestionId', $tbQuestId);
    $stmt->execute();

    $tbAnt1 = $_POST['tbAnt1'];

    $UpdateAnt = "UPDATE Antwoorden SET `Text`=:antTxt WHERE AnswerId= ?";
    $statement = $dbQuiz->prepare($UpdateAnt);

    $statement->bindparam(':antTxt,', $tbAnt1);
    $statement->execute();

    echo "Update successfully completed!";

}

I have the suspicion that the error is caused by the second question in the code. Here is the error message I'm getting:

Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[HY093]: Invalid parameter number: mixed named and positional parameters' in /home/lab/domains/u-approachlab.nl/public_html/blendi/Website/opslaan.php:81 Stack trace: #0 /home/lab/domains/u-approachlab.nl/public_html/blendi/Website/opslaan.php(81): PDOStatement->execute() #1 {main} thrown

The problem is your question mark in the second query:

$UpdateAnt = "UPDATE Antwoorden SET `Text`=:antTxt WHERE AnswerId= ?";
$statement = $dbQuiz->prepare($UpdateAnt);

$statement->bindparam(':antTxt,', $tbAnt1);
$statement->execute();

You add a question mark, but you never bind it as a parameter.

You should use something like this:

$UpdateAnt = "UPDATE Antwoorden SET `Text`=:antTxt WHERE AnswerId= :answerId";

And then also add it as a parameter:

$statement->bindparam(':answerId,', $answerId);

I don't see any answerId in your code though, so you need to get that somehow.