Advertisement
Guest User

Untitled

a guest
Dec 6th, 2016
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.94 KB | None | 0 0
  1. <?php
  2.  
  3. $query = "SELECT * FROM `portfolio` ORDER BY `pf_id` DESC";
  4. $result = mysqli_query($con, $query);
  5.  
  6. $list = '';
  7.  
  8. while ($row = mysqli_fetch_array($result))
  9. {
  10. //Linking the variables
  11. $id = $row["pf_id"];
  12. $title = $row["pf_title"];
  13. $desc = $row["pf_desc"];
  14. $pfimg = $row["pf_html"];
  15.  
  16. $date = $row["pf_date"];
  17. $time = strtotime($date);
  18. $datemdy = date("F j, Y", $time);
  19. $datetime = date("g:i A", $time);
  20.  
  21. $list .= '<a href="pfpiece.php?id='.$id.'">' . $pfimg . '</a>';
  22.  
  23. }
  24.  
  25. mysqli_close($con);
  26.  
  27. ?>
  28. <div class="pf-container">
  29. <p><?php echo $list; ?></p>
  30. </div>
  31.  
  32. <div class="pf-img-wrap"><img src="/uploads/portfolio_items/IMG/1.jpg"><div class="pf-img-title">2</div></div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement