		

<?php 
if(isset($_POST['aname'])){

extract($_POST);


require 'connection.php';
$qrygroup = "SELECT * from groupreg where groupname='aname' ";
$run_qrygroup = mysqli_query($connect, $qrygroup) or die(mysqli_error($connect));
$rowgroup = mysqli_fetch_array($run_qrygroup);
$gid=$rowgroup['groupid'];

	$qry = "SELECT * from monthlyreport where accid='$gid' ";
        $run_qry = mysqli_query($connect, $qry) or die(mysqli_error($connect));
        while($row = mysqli_fetch_array($run_qry)){

?>
		<div class="col-sm-4">
		<div class="product-image-wrapper">
		<div class="single-products">
		<div class="productinfo text-center">
		<img src="upload/<?php echo $row['picname']; ?>" alt="" />
		<h2>FLOCK# <?php echo $row['flockno']; ?></h2>
		<p><?php echo $row['shedname']; ?></p>
		<a href="#" class="btn btn-default add-to-cart"><i class="fa fa-shopping-cart"></i>Add to cart</a>
		</div>
		<div class="product-overlay">
		<div class="overlay-content">
		<h2>FLOCK# 1</h2>
		<p><?php echo $row['shedname']; ?> FLOCK DETAIL</p>
		<p>Easy Polo Black Edition</p>
		<a href="gallery.php" class="btn btn-default add-to-cart"><i class="fa fa-shopping-cart"></i>Show detail</a>
		</div>
		</div>
		</div>
		<div class="choose">
		<ul class="nav nav-pills nav-justified">
		<li><a href="#"><i class="fa fa-plus-square"></i>Add to wishlist</a></li>
		<li><a href="#"><i class="fa fa-plus-square"></i>Add to compare</a></li>
			</ul>
			</div>
		</div>
		</div>

<?php
}
}
 ?>
 <!-- ../upload/upload/ahmad1.png -->