when I run the function that includes this code I get null returned. Can anybody see my issue?
$statement = $connect->prepare("UPDATE pages " .
"SET " .
"pageTitle = :pageTitle, " .
"pageSubTitle = :pageSubTitle, " .
"pageContent = :pageContent, " .
"pageMetaKeywords = :pageMetaKeywords, " .
"pageMetaDescription = :pageMetaDescription, " .
"pageDateUpdated = :pageDateUpdated " .
"WHERE " .
"pageID = :pageID");
$array = array(
"pageTitle" => $_POST["pageTitle"],
"pageSubTitle" => $_POST["pageSubTitle"],
"pageContent" => $_POST["pageTitle"],
"pageMetaKeywords" => $_POST["pageContent"],
"pageMetaDescription" => $_POST["pageMetaDescription"],
"pageDateUpdated" => $_POST["pageDateUpdated"],
"pageID" => $_POST["pageID"]
);
$result = $statement->execute($array);
The parameters you're passing in via the array are incorrect. You need to prefix them with :
as well:
$array = array(
":pageTitle" => $_POST["pageTitle"],
^--- required