$query="INSERT INTO users (username,pwd,email) values(':userName',':pwd',':Email')";
$stmt=$pdo->prepare($query);
$stmt->bindParam(':userName',$username);
$stmt->bindParam(':pwd',$password);
$stmt->bindParam(':Email',$email);
$stmt->execute();
here’s my code my parameter are same but it keeps giving me this error
i have tried changing the placeholders names but did not work
>Solution :
In your query you have quotes around the placeholder names, making them into strings.
If you remove them it should, hopefully, work.
Like this:
$query="INSERT INTO users (username,pwd,email) values(:userName,:pwd,:Email)";