<?php
require 'shikanisha.kts.php';

// Query to get business details
$sql = "SELECT * FROM business_details LIMIT 1";
$result = $conn->query($sql);

if ($result->num_rows > 0) {
    // Fetch the first row of business details
    $businessDetails = $result->fetch_assoc();
    
    // Return data in JSON format
    echo json_encode($businessDetails);
} else {
    // No data found
    echo json_encode(["error" => "No business details found."]);
}

$conn->close();
?>
