Advertisement
Guest User

Untitled

a guest
Jul 24th, 2017
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.07 KB | None | 0 0
  1. <?php
  2. $db = mysqli_connect("localhost", "root", "", "photos");
  3. $sql = "SELECT * FROM images ORDER BY id DESC";
  4. $result = mysqli_query($db, $sql);
  5. while ($row = mysqli_fetch_array($result)) {
  6. echo "<a href='uploads/".$row['image']."' data-caption='".$row['text']."' data-fancybox='quote'> ";
  7. echo "<img id='img_div' title='".$row['image']."' alt='".$row['image']."' src='uploads/".$row['image']."'/>";
  8. //echo "<p id='img_div'>".$row['desc']."</p>";
  9. echo "</a>";
  10. echo'';
  11. echo "<a href='http://www.facebook.com/sharer/sharer.php?u=www.quotin.co/uploads/".$row['image']."'>
  12. <i id='share_div' class='fa fa-facebook fa-lg' aria-hidden='true'></i></a>";
  13. //echo "<a id='tweet_div' href='http://www.twitter.com/share?text=Check out this quote from "Quotin"!&url=http://www.quotin.co/uploads/".$row['image']."&via=_Quotin_'><i class='fa fa-twitter fa-lg' aria-hidden='true'></i></a>";
  14.  
  15. }
  16. ?>
  17.  
  18. ID int(11)
  19. image varchar(200)
  20. text text
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement