<?php
session_start();
$branch=$_SESSION['branch_id'];
$business=$_SESSION['business_id'];
include '../includes/connection.php';
$idd=$_GET['id'];



$sql = "SELECT * FROM stock where product_name=$idd && business_id='$business'";
$result = mysqli_query($conn, $sql);

if (mysqli_num_rows($result) > 0) {
$row = mysqli_fetch_assoc($result);
$price=$row['buying_price'];
    
        echo $price;
       
    
} else {
    echo "0 results";
}

?>