Advertisement
Hacksas

Div_php

Mar 20th, 2017
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.59 KB | None | 0 0
  1. <div class="w3ls_mobiles_grid_right_grid3">
  2. <?php
  3. $dbhost = 'localhost';
  4. $dbuser = 'root';
  5. $dbpass = '';
  6. $dbname = 'products';
  7. $conn = mysqli_connect($dbhost, $dbuser, $dbpass) or die ('Error connecting to mysql');
  8. mysqli_select_db($conn, $dbname);
  9. mysqli_set_charset($conn, 'utf8');
  10. $result = mysqli_query($conn, "SELECT * FROM items");
  11. while ($row = mysqli_fetch_assoc($result))
  12. { ?>
  13. <div class="col-md-4 agileinfo_new_products_grid agileinfo_new_products_grid_mobiles">
  14. <div class="agile_ecommerce_tab_left mobiles_grid">
  15. <div class="hs-wrapper hs-wrapper2">
  16. <img src="images/<?php echo $row['image']; ?>.jpg" alt=" " class="img-responsive" />
  17. <div class="w3_hs_bottom w3_hs_bottom_sub1">
  18. <ul>
  19. <li>
  20. <a href="#" data-toggle="modal" data-target="#myModal8"><span class="glyphicon glyphicon-eye-open" aria-hidden="true"></span></a>
  21. </li>
  22. </ul>
  23. </div>
  24. </div>
  25. <h5><a href="single.html"><?php echo $row['itemname']; ?></a></h5>
  26. <div class="simpleCart_shelfItem">
  27. <p><i class="item_price"><?php echo $row['descr']; ?></i></p>
  28. <p><span>$980</span> <i class="item_price">$ <?php echo $row['price']; ?></i></p>
  29. <form action="#" method="post">
  30. <input type="hidden" name="cmd" value="_cart" />
  31. <input type="hidden" name="add" value="1" />
  32. <input type="hidden" name="w3ls_item" value="Asus Laptop" />
  33. <input type="hidden" name="amount" value="<?php echo $row['price']; ?>"/>
  34. <button type="submit" value="submit" class="w3ls-cart">Add to cart</button>
  35. </form>
  36. </div>
  37. </div>
  38. </div>
  39. <?php }?>
  40. </div>
  41. <? endwhile; ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement