Advertisement
Guest User

Untitled

a guest
Jun 24th, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.48 KB | None | 0 0
  1. <?php
  2. $type = 'cpu';
  3. if(!isset($_GET['type'])) {
  4. echo '
  5. ';
  6. }
  7. else {
  8.  
  9. $sql = "SELECT * FROM components WHERE componentType='cpu' LIMIT 20";
  10. $result = mysqli_query($connection, $sql);
  11. while($record = mysqli_fetch_assoc($result)) { //pod apostrofima pisi ime kolone koje oces da se ispisuje iz baze
  12. echo '
  13.  
  14. <div class="col-xl-4 col-lg-6 col-md-12 col-sm-12 col-xs-12">
  15. <div class="my-list">
  16. <img src="'.$record['imageLink'].'"/>
  17. <h3>'.$record['title'].'</h3>
  18. <span>Cena:</span>
  19. <span class="pull-right">'.$record['price'].'RSD</span>
  20. <div class="offer">Extra 5% Off. Cart value Rs 500</div>
  21. <div class="detail">
  22. <p class="giveMeEllipsis">'.$record['title'].' </p>
  23. <img src="'.$record['imageLink'].'" alt="dsadas" />
  24. <a onclick="select('.$record['id'].',\''.$record['title'].'\',\''.$record['imageLink'].'\','.$record['price'].')" class="btn btn-info" value="'.$record['id'].'">odaberi</a>
  25. </div>
  26. </div>
  27. </div>
  28. ';
  29. }
  30. }
  31. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement