%PDF- %GIF98; %PNG;
Server : ApacheSystem : Linux sh00666.bluehost.com 5.14.0-687.26.1.el9_8.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Jul 14 16:32:02 EDT 2026 x86_64 User : ndkhermy ( 1200) PHP Version : 8.5.12 Disable Function : NONE Directory : /home1/ndkhermy/public_html/website_93b53270/ |
Upload File : |
<?php
include("config.php");
error_reporting(0);
if (isset($_GET['brand_id'])) {
$brandId = intval($_GET['brand_id']);
$sql = "SELECT * FROM `variant_tbl` WHERE brand_id = $brandId AND status = 1 ORDER BY id ASC";
$result = mysqli_query($conn, $sql);
$variants = [];
while ($row = mysqli_fetch_assoc($result)) {
$variants[] = [
'id' => $row['id'],
'title' => $row['title'],
'image1' => $base_url . 'images/Upload/variant/' . $row['image1']
];
}
// Return JSON response
header('Content-Type: application/json');
echo json_encode($variants);
}
?>