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.
12345678910111213141516171819202122232425262728<?php
require_once 'core.php';
$valid['success'] = array('success' => false, 'messages' => array());
$orderId = $_POST['orderId'];
if($orderId) {
$sql = "UPDATE orders SET order_status = 2 WHERE order_id = {$orderId}";
$orderItem = "UPDATE order_item SET order_item_status = 2 WHERE order_id = {$orderId}";
if($connect->query($sql) === TRUE && $connect->query($orderItem) === TRUE) { $valid['success'] = true; $valid['messages'] = "Successfully Removed"; } else { $valid['success'] = false; $valid['messages'] = "Error while remove the brand"; } $connect->close();
echo json_encode($valid); } // /if $_POST