Hello here is the code to import categories, but something bad
error:
Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'kategorijos(name, desc, ordering, visibility, allowcomm, allowads) VALUES([' at line 2' in /home/u410366608/public_html/admin/categories.php:136 Stack trace: #0 /home/u410366608/public_html/admin/categories.php(136): PDOStatement->execute(Array) #1 {main} thrown in /home/u410366608/public_html/admin/categories.php on line 136
code: `elseif ($do == 'Insert') {
if ($_SERVER['REQUEST_METHOD'] =='POST') {
echo "<h1 class='text-center'>Prideti kategorija.</h1>";
echo "<div class='container'>";
$name = $_POST['name'];
$desc = $_POST['description'];
$order = $_POST['ordering'];
$visible = $_POST['visibility'];
$comment = $_POST['commenting'];
$ads = $_POST['ads'];
$check = checkItem("name", "kategorijos", $name);
if ($check == 1) {
echo "<div class='container'>";
$theMsg = '<div class="alert alert-danger">Tokia kategorija jau yra.</div>';
redirectHome($theMsg, 'back' );
echo "</div>";
}
else {
$stmt = $con->prepare("INSERT INTO kategorijos(name, desc, ordering, visibility, allowcomm, allowads)
VALUES([:zname], [:zdesc], [:zorder], [:zvisible], [:zcomment], [:zads])");
$stmt->execute(array(
'zname' => $name,
'zdesc' => $desc,
'zorder' => $order,
'zvisible' => $visible,
'zcomment' => $comment,
'zads' => $ads
));
echo "<div class='container'>";
$theMsg = "<div class='alert alert-success'>" . $stmt->rowCount() . 'Kategorija prideta.</div>';
redirectHome($theMsg, 'back' );
echo "</div>";
}
}
else {
echo "<div class='container'>";
$theMsg = '<div class="alert alert-danger">Neturite siam puslapiui teisiu.</div>';
redirectHome($theMsg, 'back');
echo "</div>";
}
echo "</div>";
}`
pls help