<?php
include ("config.php");

$q=$_GET["q"];
$cat=$_GET["cat"];
$sub=$_GET["sub"];

$sqlddd="SELECT * FROM  products where category ='$cat' and sub_category='$sub' and sub_sub_cat='$q'";
$resultdddd = mysql_query($sqlddd);
$fetiii=mysql_fetch_array($resultdddd);

$serial=$fetiii['serial'];

$quantity=$fetiii['quantity'];
							 if($quantity<=0)
							 {
							 ?>
							 <a href="#" onclick="return confirm('Out Of Stock')"><img src="images/xx.jpg" width="40" height="50" title="Shop Now"/></a>
                             <?php } else { ?>  
                             <a href="#" onclick="addtocart(<?php echo $serial; ?>)"><img src="images/xx.jpg" width="40" height="50" title="Shop Now"/></a>
                             <?php } ?>  
