vdp

Untitled

vdp
Jul 31st, 2018
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.84 KB | None | 0 0
  1. <?php
  2.  
  3. include("includes/db.php");
  4. include("functions/functions.php");
  5. include("includes/header.php");
  6. ?>
  7.  
  8.     <section>
  9.         <div class="container">
  10.             <div class="row">
  11.                 <?php include("includes/nav.php");?>
  12.  
  13.                 <div class="col-sm-9 padding-right">
  14.                     <div class="features_items"  id="products_box"><!--features_items start-->
  15.                         <h2 class="title text-center">Search Result</h2>
  16.  
  17.                         <?php
  18.                         if(isset($_GET['search']))
  19.                         {
  20.                             $user_keyword = $_GET['user_query'];
  21.  
  22.                             $get_products = "select * from products where product_keywords LIKE '%$user_keyword%'";
  23.                             $run_products = mysqli_query($con, $get_products);
  24.  
  25.                             while($row_products= mysqli_fetch_array($run_products))
  26.                             {
  27.                                 $pro_id = $row_products['product_id'];
  28.                                 $pro_title = $row_products['product_title'];
  29.                                 $pro_cat = $row_products['cat_id'];
  30.                                 $pro_brand = $row_products['brand_id'];
  31.                                 $pro_desc = $row_products['product_desc'];
  32.                                 $pro_price = rupiah($row_products['product_price']);
  33.                                 $pro_image = $row_products['product_img1'];
  34.  
  35.                                 echo "
  36.                                 <div class='col-sm-4'>
  37.                                 <h3>$pro_title</h3>
  38.  
  39.                                 <img src='admin_area/product_images/$pro_image' width='160' height='160'/><br>
  40.                                 <p><b>Price: $pro_price</b></p>
  41.                                 <a href='details.php?pro_id=$pro_id' class='btn btn-default' style='float:left;'><i class='fa fa-eye'></i>&nbsp;Details</a>
  42.                                 <a href='index.php?add_cart=$pro_id'><button class='btn btn-success' style='float:right;'><i class='fa fa-shopping-cart'></i>&nbsp;Add to Cart</button></a>
  43.  
  44.                                 </div>
  45.  
  46.                                 ";
  47.                                     }//while
  48.                                 }//if
  49.                                 ?>
  50.  
  51.  
  52.                             </div><!--features_items Ends-->
  53.  
  54.  
  55.                         </div><!--/category-tab-->
  56.  
  57.  
  58.  
  59.                     </div>
  60.                 </div>
  61.             </div>
  62.         </section>
  63.  
  64.         <?php include("includes/footer.php");?>
  65.     </body>
  66.     </html>
Add Comment
Please, Sign In to add comment