php-guestbook/index.php

27 lines
521 B
PHP

<!DOCTYPE html>
<?php
require_once('persistence.php');
$db = createDB();
?>
<html lang="ca">
<head>
<meta charset="utf-8"/>
<title>Guestbook</title>
</head>
<body>
<table border="1">
<?php
//storeMessage($db, 'Hola Dendy');
$test = getMessages($db);
foreach($test as $msg) {
echo('<tr>');
foreach($msg as $key => $value) {
echo("<td>$key: $value</td>");
}
echo('</tr>');
}
?>
</table>
</body>
</html>