summaryrefslogtreecommitdiffstats
path: root/static/contact
diff options
context:
space:
mode:
authorrsiddharth <s@ricketyspace.net>2019-07-08 20:45:03 -0400
committerrsiddharth <s@ricketyspace.net>2019-07-08 20:46:34 -0400
commit15fb6c184781ae1017f4286d5a9d2b22a871c6d0 (patch)
tree94024811afd70c32f0f4b0b6290abd8f046e4648 /static/contact
parent4dc861f8c415d3073d0f55c0ec88a5be2cc1577a (diff)
/conact form: Add "Meaning of life" challenge.
Diffstat (limited to 'static/contact')
-rwxr-xr-xstatic/contact/index.html9
-rw-r--r--static/contact/submit/index.php4
2 files changed, 13 insertions, 0 deletions
diff --git a/static/contact/index.html b/static/contact/index.html
index 68d741a..f97ccbe 100755
--- a/static/contact/index.html
+++ b/static/contact/index.html
@@ -45,6 +45,15 @@
</div>
<div class="field">
+ <label class="label c">What is 41 + 1?</label>
+ <div class="control">
+ <input name="c" class="input" type="number"
+ placeholder="Meaning of life"
+ required>
+ </div>
+ </div>
+
+ <div class="field">
<div class="control">
<button class="button is-link" type="submit">
Submit
diff --git a/static/contact/submit/index.php b/static/contact/submit/index.php
index 0ba86d2..f2d2200 100644
--- a/static/contact/submit/index.php
+++ b/static/contact/submit/index.php
@@ -35,6 +35,7 @@ function post() {
$n = $_POST['name'];
$e = $_POST['email'];
$m = $_POST['msg'];
+ $c = $_POST['c'];
$errors = [];
if (!email_valid($e)) {
@@ -43,6 +44,9 @@ function post() {
if (empty($m)) {
$errors[] = em_fw('Message is required');
}
+ if ($c !== '42') {
+ $errors[] = '41 + 1 is not \'' . $c . '\'';
+ }
$errors[] = 'This form is disabled for now';
$sok = true;