SQLSTATE[HY093]: Invalid parameter number: number of bound variables does not match number of tokens
I know there are several questions with the same problem out there. But I've checked all the answers and the problem still cannot be solved. Really hope anyone could help me out. Thank you so much!
session_start();
$cid = $_POST['cid'];
$pContent = $_POST['pContent'];
$sContent = $_POST['sContent'];
$insert = "INSERT INTO 'Card'('cardID', 'creator', 'primaryLanguage',
'secondaryLanguage', 'primaryContent', 'secondaryContent')
VALUES (:cid, 'abc', 'English', 'Chinese', ':pContent', ':sContent')";
try {
$stmt = $dbh->prepare($insert, array(PDO::ATTR_CURSOR => PDO::CURSOR_FWDONLY));
$stmt->bindValue(":cid", $cid, PDO::PARAM_INT);
$stmt->bindValue(":pContent", $pContent, PDO::PARAM_STR);
$stmt->bindValue(":sContent", $sContent, PDO::PARAM_STR);
$stmt->execute();
unset($stmt);
} catch (Exception $e) {
echo 'Exception : ' . $e->getMessage() . "
";
die();
}