prepare('SELECT * FROM categories'); $stmt->execute(); $categories = $stmt->fetchAll(PDO::FETCH_ASSOC); // Handle success messages if (isset($_GET['success_msg'])) { if ($_GET['success_msg'] == 1) { $success_msg = 'Category created successfully!'; } if ($_GET['success_msg'] == 2) { $success_msg = 'Category updated successfully!'; } if ($_GET['success_msg'] == 3) { $success_msg = 'Category deleted successfully!'; } } // Populate categories function function admin_populate_categories($categories, $parent_id = 0, $n = 0) { $html = ''; foreach ($categories as $category) { if ($parent_id == $category['parent_id']) { $html .= '
View, create, and edit categories.
=$success_msg?>
| Name | Actions | ||||||
| There are no categories | |||||||