您的 SQL 语法有误;查看与您的 MariaDB 服务器版本对应的手册,了解要使用的正确语法

You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use

我一直收到错误消息:-

"You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'Password='evertonblues' Forename='Josh' Surname='Edmondson' Date of Birth='199' at line 1"

我的更新查询 运行 时出错。

$result = mysqli_query($con, "UPDATE Users SET Username='".$newUsername."' Password='".$newPassword."' Forename='".$newForename."' Surname='".$newSurname."' `Date of Birth`='".$newDateofBirth."'     Address='".$newAddress."' `Post Code`='".$newPostcode."' Email='".$newEmail."' `Phone Number`='".$newPhonenumber."' WHERE `User ID`='".$newUserid."';");

你忘记了一堆逗号:

..snip... SET Username='".$newUsername."' Password='".$newPassw
                                         ^-- and many others

使用如下查询:

"UPDATE Users SET `Username`='".$newUsername."', `Password`='".$newPassword."', `Forename`='".$newForename."', `Surname`='".$newSurname."', `Date of Birth`='".$newDateofBirth."', `Address`='".$newAddress."', `Post Code`='".$newPostcode."', `Email`='".$newEmail."', `Phone Number`='".$newPhonenumber."' WHERE `User ID`='".$newUserid."';");

还有 space 在 Date of Birth