+2
-2
@@ -53,7 +53,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
$ins = $db->prepare('INSERT INTO entries (name, msg, ts) VALUES (?, ?, ?)');
|
||||
$ins->execute([
|
||||
gb_censor(mb_substr($name, 0, 40)),
|
||||
gb_censor(mb_substr($msg, 0, 500)),
|
||||
gb_censor(mb_substr($msg, 0, 250)),
|
||||
$now,
|
||||
]);
|
||||
$db->prepare('INSERT INTO ratelimit (ip_hash, last_ts) VALUES (?, ?)
|
||||
@@ -100,7 +100,7 @@ require __DIR__ . '/inc/header.php';
|
||||
<form hx-post="/guestbook.php" hx-target="#entries" hx-swap="innerHTML"
|
||||
method="post" action="/guestbook.php">
|
||||
<input name="name" placeholder="name" maxlength="40" required>
|
||||
<textarea name="msg" placeholder="say something…" maxlength="500" required></textarea>
|
||||
<textarea name="msg" placeholder="say something…" maxlength="250" required></textarea>
|
||||
<input name="url" tabindex="-1" autocomplete="off" aria-hidden="true"
|
||||
style="position:absolute;left:-9999px" placeholder="leave this empty">
|
||||
<button type="submit">sign</button>
|
||||
|
||||
Reference in New Issue
Block a user