Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $connection = new mysqli("localhost","root","","ferrari");
- $query = "SELECT * FROM commenti";
- $result = $connection->query($query);
- if ($result->num_rows==0)
- {
- echo "<div class=\"text5\">";
- echo "Non ci sono commenti";
- echo "</div>";
- }
- else {
- echo "<table align=\"center\">";
- while($row = $result->fetch_array())
- {
- echo "<tr>";
- echo "<td><b>$row[0]</b> ha scritto:</td>";
- echo "<td>\"$row[1]\"</td>";
- echo "<td>in data <i>$row[2]</i></td>";
- echo "</tr>";
- }
- echo "</table>";
- }
- $result->free();
- $connection->close();
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement