Advertisement
Guest User

Untitled

a guest
Jun 25th, 2019
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. <?php
  2.  
  3. $mysqli = new mysqli("localhost", "***", "***", "***");
  4. // $mysqli->set_charset('utf8');
  5.  
  6. $sql = "SELECT * FROM `posts` as p INNER JOIN posts_contenido as c ON p.id_post = c.id";
  7. $result = mysqli_query($mysqli, $sql);
  8. $resultCheck = mysqli_num_rows($result);
  9.  
  10. echo "<table>";
  11. if($resultCheck > 0){
  12.  
  13. while($fila = mysqli_fetch_assoc($result)){
  14.  
  15. echo "<tr>";
  16. echo "<td>";
  17. ?> <img alt ="database_img" src ="<?php echo $fila["url_img"]; ?>" height="100" width="100">
  18. <?php echo "</td>";
  19. echo "</tr>";
  20. }
  21.  
  22. }
  23. echo "</table>";
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement