If you are a beginner following this tutorial in 3:17:42 after you refresh your server you will encounter this error.
How to bypass this error is to simply declare an if empty statement before the $pdo prepared statement, it should look like this;
if (empty($errors)) {
$statement = $pdo->prepare("INSERT INTO products (title, image, description, price, create_date)
VALUES (:title, :image, :description, :price, :date)");
$statement->bindValue(':title', $title);
$statement->bindValue(':image', '');
$statement->bindValue(':description', $description);
$statement->bindValue(':price', $price);
$statement->bindValue(':date', $date);
$statement->execute();
}
your code should run and you will see the form validation.