:: **Zploit** v1.0 | Current Path: **/home/kreativepixelz/www/crm/quatation/**
:: Editing File: ajax_get_product_unit.php
<?php include("db.php"); if (isset($_GET['product_id'])) { $product_id = (int)$_GET['product_id']; $sql = "SELECT unit_type FROM packaging_materials WHERE id = '$product_id'"; $res = mysqli_query($conn, $sql); if ($row = mysqli_fetch_assoc($res)) { echo json_encode([ 'status' => 'success', 'unit' => $row['unit_type'] ]); } else { echo json_encode([ 'status' => 'error' ]); } } ?>