• File: fetchSelectedProduct.php
  • Full Path: /home/dealkatnwc/www/GARAGE/php_action/fetchSelectedProduct.php
  • Date Modified: 12/11/2023 3:34 PM
  • File size: 383 bytes
  • MIME-type: text/x-php
  • Charset: utf-8
<?php 	

require_once 'core.php';

$productId = $_POST['productId'];

$sql = "SELECT product_id, product_name, product_image, brand_id, categories_id, quantity, rate, active, status FROM product WHERE product_id = $productId";
$result = $connect->query($sql);

if($result->num_rows > 0) { 
 $row = $result->fetch_array();
} // if num_rows

$connect->close();

echo json_encode($row);