summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--header.php6
-rw-r--r--index.php4
2 files changed, 9 insertions, 1 deletions
diff --git a/header.php b/header.php
index 42925fa..53a0471 100644
--- a/header.php
+++ b/header.php
@@ -255,6 +255,10 @@
:target.modal .card {
overflow: auto;
}
+
+ .honeypot {
+ display: none;
+ }
</style>
<link rel="preconnect" href="https://fonts.gstatic.com" />
<link href="https://fonts.googleapis.com/css2?family=Architects+Daughter&family=Indie+Flower&family=PT+Sans&display=swap" rel="stylesheet" />
@@ -273,6 +277,8 @@
</head>
<body>
+ <a class="honeypot" href="mailto:honeypot@53hor.net">Honeypot</a>
+
<nav>
<a href="/#contact">Contact Me</a>
<a href="/#reviews">Reviews</a>
diff --git a/index.php b/index.php
index c3aef21..2ec6e5e 100644
--- a/index.php
+++ b/index.php
@@ -365,6 +365,8 @@
<label for="email">Email Address</label>
<input name="email" type="email" id="email" placeholder="jdoe85@aol.com" required />
+ <input class="honeypot" name="content" type="text" />
+
<label for="body">Question/Comment</label>
<textarea name="body" id="body" placeholder="Briefly describe your inquiry, including any services or areas of study you're interested in." required></textarea>
@@ -379,7 +381,7 @@
require('PHPMailer-master/src/Exception.php');
// handle form submission
- if (isset($_POST['name'], $_POST['email'], $_POST['body'])) {
+ if (empty($_POST['content']) && isset($_POST['name'], $_POST['email'], $_POST['body'])) {
$body = substr(strip_tags($_POST['body']), 0, 16384);
$name = substr(strip_tags($_POST['name']), 0, 255);