Implement Guestbook Display + Mobile Display
This commit is contained in:
parent
8da3310285
commit
38f9f9e6f2
6 changed files with 75 additions and 34 deletions
|
|
@ -4,14 +4,42 @@
|
|||
<meta charset="UTF-8">
|
||||
<title>My Cool Guestbook!</title>
|
||||
<link rel="stylesheet" href="../readable.css"</link>
|
||||
<link rel="stylesheet" href="./guestbook.css"</link>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
</head>
|
||||
<body>
|
||||
This is a guestbook, made by fbievan
|
||||
<header>
|
||||
<h1>Guestbook</h1>
|
||||
<p>This is a guestbook, made by fbievan</p>
|
||||
</header>
|
||||
<nav>
|
||||
<a href="../index.html">Back Home</a>
|
||||
</nav>
|
||||
<main>
|
||||
<form action="./submit.php" method="post">
|
||||
<input type="text" name="fname" placeholder="name"></input>
|
||||
<input type="text" name="fmessage" placeholder="Message"></input>
|
||||
<input type="submit"></input>
|
||||
</form>
|
||||
<?php
|
||||
$data = json_decode(file_get_contents('test.json'), true);
|
||||
echo "<div>";
|
||||
foreach($data as $post) {
|
||||
echo '<section class="guestbookpost">';
|
||||
echo "<h4>";
|
||||
echo $post["name"] . "<br>";
|
||||
echo "</h4>";
|
||||
echo "<p>";
|
||||
echo $post["message"] . "<br>";
|
||||
echo "</p>";
|
||||
echo "</section>";
|
||||
}
|
||||
echo "</div>";
|
||||
|
||||
?>
|
||||
</main>
|
||||
<footer>
|
||||
I'm cool
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue