From f9ae0447926c152f6d48a78475ee62747d8f2146 Mon Sep 17 00:00:00 2001 From: deepend-tildeclub <58404188+deepend-tildeclub@users.noreply.github.com> Date: Sat, 23 Mar 2024 13:42:06 -0600 Subject: [PATCH] Update index.php --- signup/index.php | 39 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) diff --git a/signup/index.php b/signup/index.php index 59110be..61fa5e0 100644 --- a/signup/index.php +++ b/signup/index.php @@ -2,6 +2,43 @@ $title = "sign up for the tilde.club!"; include __DIR__."/../header.php"; -
Sorry Signups are currently closed.
+function esc($v) { + return isset($_REQUEST[$v]) ? htmlspecialchars($_REQUEST[$v]) : ""; +} + +function isGmail($email) { + return substr(strrchr($email, "@"), 1) === 'gmail.com'; +} + +$gmailError = false; +if ($_SERVER['REQUEST_METHOD'] === 'POST') { + if (isGmail($_REQUEST['email'])) { + $gmailError = true; + } else { + // Process the form here only if the email is not a Gmail address + include 'signup-handler.php'; + } +} +?> + +Sorry Signups are currently closed. Come back soon!
+ + + + + +