GIF89a php
Current File : /home/hencockfreshchic/public_html/app/loadProds.php
<?php
ob_start();
ini_set('error_reporting', E_STRICT);
include("connect.php");
include("libs.php");
mysqli_set_charset($conn,'utf8');
date_default_timezone_set('Asia/Kolkata');

$text='%'.$_GET['text'].'%';
?>
<div class="row my-1">
<?php
$sqlP="SELECT * FROM `products` WHERE `p_name` LIKE '".$text."' ORDER BY `sr` DESC";
$rsP=mysqli_query($conn,$sqlP);
$chkP=mysqli_num_rows($rsP);
if($chkP>0){
while($rowP=mysqli_fetch_array($rsP)){
?>
		<div class="col-6 p-2" id="lay2">
                 <div class="border bg-light p-2 rounded">
                  <button type="button" class="btn btn-primary btn-sm py-0 px-1 rounded-pill my-1"><small class="text-size"><?php echo discountCal($rowP['sale_price'],$rowP['real_price']); ?>% OFF</small></button>
                   <figure class="figure" onclick="location.href='description.php?prod_id=<?php echo $rowP['sr']; ?>';">
                     <img src="<?php echo "../admin.cpanel/".$rowP['image']; ?>" class="figure-img img-fluid mx-auto d-flex w-90 img-thumbnail" style="width:130px; height: 100px">
                     <span><i class="bi bi-stopwatch-fill text-success"><small>35 Mins. delivery time</small></i></span><br>
                     <span class="text-dark p-0" id="lay1"><b class=""><?php echo ucfirst($rowP['p_name']); ?></b></span><br>
                     <span class="text-size p-0"><?php echo ucfirst($rowP['p_size']); ?></span>                     
                   </figure>
                   <button class="btn btn-outline-success" type="button" onclick="addCart('<?php echo $rowP['sr']; ?>','<?php echo $_COOKIE["user_id"]; ?>','<?php echo $rowP['sale_price']; ?>','1')">ADD</button>
                </div>
              </div> 
              <?php } } else { echo "No Product Found"; }?>
          </div>