readme update and comments added to code

This commit is contained in:
kake26 2022-01-04 16:44:58 -06:00
parent 14a81a7425
commit fb38c4b744
2 changed files with 4 additions and 3 deletions

View file

@ -1,3 +1,3 @@
# contactform
A craft and bot resistant contact form
A spam and bot resistant contact form. Remeber to update the URL and e-mail address this sends to if you use it.

View file

@ -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);