Advertisement
Guest User

Untitled

a guest
May 27th, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.50 KB | None | 0 0
  1.     <?php
  2.     include 'connection.php';
  3.     $resultat = $conn->query("SELECT * FROM Kommentarer");
  4.  
  5.     if ($resultat->num_rows != 0)
  6.       {
  7.           while($row = $resultat->fetch_assoc())
  8.           {
  9.             $kommentar = $row['kommentar'];
  10.             $eposten = $row['epost'];
  11.             echo "<div class='kommentarernasida'> Epost: $eposten <br/> $kommentar <br/></div>";
  12.           }
  13.       }
  14.       else
  15.         {
  16.           echo "Det finns inga kommentarer ännu!";
  17.         }
  18.      ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement