This seperates the two HTML fetches to fetch-sql.php and fetch-json.php, this even means I could use both, or even provide an option to select between the submisson types. I think that however would be too much for me to maintain, so I will only use one or another. I do want to work on the datatype, and using .ini configuration for SQL and for selecting the datatype by default. If there are optimzations I can make to my SQL querys, I will try to implment those, however I know of none such optimzations.
32 lines
766 B
HTML
32 lines
766 B
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<title>My Cool Guestbook!</title>
|
|
<link rel="stylesheet" href="/css/readable.min.css"</link>
|
|
<link rel="stylesheet" href="./guestbook.css"</link>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
</head>
|
|
<body>
|
|
<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-sql.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
|
|
include("fetch-sql.php");
|
|
?>
|
|
</main>
|
|
<footer>
|
|
I'm cool
|
|
</footer>
|
|
</body>
|
|
</html>
|