From fb38c4b744ffc89da6f277ae63c77cdc8d0acb04 Mon Sep 17 00:00:00 2001 From: kake26 Date: Tue, 4 Jan 2022 16:44:58 -0600 Subject: [PATCH] readme update and comments added to code --- README.md | 2 +- contactform.php | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 72901f0..7ce7169 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,3 @@ # contactform -A craft and bot resistant contact form \ No newline at end of file +A spam and bot resistant contact form. Remeber to update the URL and e-mail address this sends to if you use it. \ No newline at end of file diff --git a/contactform.php b/contactform.php index bbac22d..2f9ebe7 100644 --- a/contactform.php +++ b/contactform.php @@ -2,7 +2,8 @@ // Form code for mail submissions // For usage with hugo site -// Anti exploit code, not perfect but should throw a wrench into a bot's plan +// Anti exploit code, not perfect but should throw a wrench into a bot's plan +// This code has been used on several sites before and does seem to do a decent job, not perfect but pretty good session_start(); @@ -48,7 +49,7 @@ class antibot { return $passfail; } - private function test_input($data) { + private function test_input($data) { // Cleans the input $data = trim($data); $data = stripslashes($data); $data = htmlspecialchars($data);