This commit is contained in:
Frankie B 2022-10-02 17:56:56 +00:00
parent 8f756be28b
commit f01a1aaf1e
2 changed files with 6 additions and 6 deletions

View file

@ -6,7 +6,7 @@
<?php require('../inc/head.html'); ?> <?php require('../inc/head.html'); ?>
<!-- Page-specific --> <!-- Page-specific -->
<title>Bookmarks</title> <title>Guestbook</title>
<!--<link rel="shortcut icon" href="../res/img/icons/ico/calc.ico" type="image/x-icon">--> <!--<link rel="shortcut icon" href="../res/img/icons/ico/calc.ico" type="image/x-icon">-->
<meta property="og:title" content="Guestbook"> <meta property="og:title" content="Guestbook">
<meta property="og:description" content="h"> <meta property="og:description" content="h">

View file

@ -6,7 +6,7 @@
<?php require('../inc/head.html'); ?> <?php require('../inc/head.html'); ?>
<!-- Page-specific --> <!-- Page-specific -->
<title>Bookmarks</title> <title>Guestbook</title>
<!--<link rel="shortcut icon" href="../res/img/icons/ico/calc.ico" type="image/x-icon">--> <!--<link rel="shortcut icon" href="../res/img/icons/ico/calc.ico" type="image/x-icon">-->
<!--<meta property="og:image" content="/res/img/icons/png/computer.png">--> <!--<meta property="og:image" content="/res/img/icons/png/computer.png">-->
</head> </head>
@ -17,13 +17,13 @@
<div id="pagebody"> <div id="pagebody">
<div id="content"> <div id="content">
<?php <?php
// Open the DB $name = strip_tags($_POST["name"]);
if ($_POST['name'] === "" || $_POST['message'] === "") { $msg = strip_tags($_POST["message"]);
if ($msg === "" || $name === "" || strip_tags(htmlspecialchars_decode($msg)) === "") {
echo '<b>You must provide both a name and message!</b>'; echo '<b>You must provide both a name and message!</b>';
} else { } else {
$db = new PDO("sqlite:/mnt/data1/webdata/floppydisk/guestbook.db"); $db = new PDO("sqlite:/mnt/data1/webdata/floppydisk/guestbook.db");
$name = $_POST["name"];
$msg = strip_tags($_POST["message"]);
$showinfo = isset($_POST["showinfo"]) ? true : false; $showinfo = isset($_POST["showinfo"]) ? true : false;
$showip = isset($_POST["showip"]) ? true : false; $showip = isset($_POST["showip"]) ? true : false;
$ip = $_SERVER['REMOTE_ADDR']; $ip = $_SERVER['REMOTE_ADDR'];