<?php
include '../includes/connection.php';

$id_user=$_SESSION['id'];
$branch=$_SESSION['branch_id'];
$business=$_SESSION['business_id'];
$sql = "SELECT * FROM business where business_id='$business'";
$sql1 = mysqli_query($conn,"SELECT * FROM branches where branch_id='$branch'");
$result = mysqli_query($conn, $sql);

if (mysqli_num_rows($result) > 0) {
    // output data of each row
    while($row = mysqli_fetch_assoc($result)) {
        $businessname=$row['business_name'];
        
    }
} else {
    echo "0 results";
}
$row1 = mysqli_fetch_array($sql1);
$branch_name=$row1['branch_name'];
$businesscontact=$row1['contact'];
$businessemail=$row1['email'];
$businessaddress=$row1['location'];
?>

<div style=" transform: scale(1,1.5); font-size: 16px;">
    <div style=" font-size: 20px;"><center><strong><br><?php echo $businessname ?></strong></center></div>
    <?php
    $checkbr = mysqli_fetch_array(mysqli_query($conn,"SELECT indicate_branch from receipt_settings where branch_id='$branch'"));
    $bvalue=$checkbr['indicate_branch'];
    if ($bvalue==1) {
        ?>
        <div><center><strong><?php echo $branch_name ?> </strong></center></div>
        <?php
    }
    ?>
	
	<div ><strong>Location: <?php echo $businessaddress ?></strong></div>
	<div><strong>TEl: +256 <?php echo $businesscontact ?></strong></div>
	<div><strong>Email: <?php echo $businessemail ?></strong><br></div>
	
</div>


  
  




