Please respect the
INSERT
command syntax:
MySQL :: MySQL 8.0 Reference Manual :: 13.2.6 INSERT Statement[
^]
- You did not provide the list of columns to insert
- There is no SET keyword in INSERT statement
- You did no use the VALUES clause
Moreover, you should use prepared statements to avoid SQL injection attacks:
PHP MySQL Prepared Statements[
^]
if (empty($error)) {
if(move_uploaded_file($_FILES["profileImage"]["tmp_name"], $target_file)) {
$stmt = $conn->prepare
(
"INSERT INTO `users` (`profile_image`, `bio`) VALUES (?, ?)"
);
$stmt->bind_param("ss", $profileImageName, $bio);
$stmt->execute();
// ...
}
}