Something went wrong. Try again.
Open source inventory management system with php and mysql Invoice generation and easy to download invoice in PDF format Lightweight and ea…
Something went wrong. Try again.
123456789101112131415161718192021222324252627<?php
require_once 'core.php';
$valid['success'] = array('success' => false, 'messages' => array());
if($_POST) {
$brandName = $_POST['editCategoriesName']; $brandStatus = $_POST['editCategoriesStatus']; $categoriesId = $_POST['editCategoriesId'];
$sql = "UPDATE categories SET categories_name = '$brandName', categories_active = '$brandStatus' WHERE categories_id = '$categoriesId'";
if($connect->query($sql) === TRUE) { $valid['success'] = true; $valid['messages'] = "Successfully Updated"; } else { $valid['success'] = false; $valid['messages'] = "Error while updating the categories"; } $connect->close();
echo json_encode($valid); } // /if $_POST