I am trying to update data but i get this error.
Uncaught exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' username = 'test1', email = 'test1@gmail.com', phone = '012365478'' at line 1' in page.php:16
php:
<?php
$thename = $_POST['name'];
$theusername = $_POST['username'];
$emailaddress = $_POST['email'];
$phonenumber = $_POST['phone'];
$status = "Decline";
require "connection.php";
$decline = $dbh->prepare("UPDATE users SET status = ? WHERE name = ?, username = ?, email = ?, phone = ?");
$decline->bindParam(1, $status, PDO::PARAM_STR);
$decline->bindParam(2, $thename, PDO::PARAM_STR);
$decline->bindParam(3, $theusername, PDO::PARAM_STR);
$decline->bindParam(4, $emailaddress, PDO::PARAM_STR);
$decline->bindParam(5, $phonenumber, PDO::PARAM_STR);
$decline->execute();
?>
is it because its a string? i've come to realize when it comes to strings its not so straighforward.