<div class="product_footer"> <a href="http://localhost:8888/eretail/view.php?view_product_id=<?php echo $row[0]; ?> ">View </a> <a href="http://localhost:8888/eretail/index.php?product_id=<?php echo $row[0]; ?> ">Add </a> </div> </div> <?php } } else { $result = $admin->getProductByCategoryId($category_id); while ($row = mysql_fetch_array($result)) { ?> <div class="product left"> <div class="product_header"> <h3 class="left_head"><?php echo ucfirst($row[1]); ?> </h3><h3 class="right_head">Rs. <?php echo $row[2]; ?> </h3> <div class="clear"></div> </div> <div class="product_image">