<?php require '../model/class_connect_db.php'; require '../model/class_update.php'; if (isset($_POST['names'], $_POST['title'], $_POST['description'], $_POST['keywords'], $_POST['url'])) { $keywords = $_POST['keywords']; if (isset($_POST['edit'], $_POST['marka'])) { $parent_id = $_POST['marka']; $id_cat = $_POST['edit']; } else { $parent_id = 0; $id_cat = $_POST['edit']; } $update = new Update(); $result = $update->cat_update($id_cat, $parent_id, $_POST['names'], $_POST['title'], $_POST['description'], $_POST['keywords'], $_POST['url']); if ($result == true) { header("Location: ../pages/catalog.php"); } else { var_dump($result); } }