if (!empty($_POST['message']) && !empty($_POST['user_name'])) { $name = $_POST['user_name']; $text = $_POST['message']; $product = (is_numeric($_POST['product']) && !empty($_POST['product'])) ? $_POST['product']:NULL; $sql = "INSERT INTO `user277145_jess`.`otzivi` (`id`, `name`, `text`, `product`, `time`) VALUES (NULL, ':name', ':text', :product, ".time().";"; //die($sql); $resutl = $mysql->query($sql, [':name'=> $name, ':text' => $text, ':product' => $product]); } Here is the error:
SQLSTATE [42000]: Syntax error or access violation: 1064 SQL syntax; check it out at the line.
Can I poke a finger where I have a mistake?