2019-09-14 16:58:11 +00:00
|
|
|
<?php
|
2024-01-21 04:58:25 +00:00
|
|
|
ini_set('display_errors', 1);
|
|
|
|
ini_set('display_startup_errors', 1);
|
|
|
|
error_reporting(E_ALL);
|
|
|
|
|
2024-01-19 23:00:43 +00:00
|
|
|
$title = "Sign up for the tilde.club!";
|
2019-09-14 18:29:05 +00:00
|
|
|
include __DIR__."/../header.php";
|
2021-09-12 21:24:57 +00:00
|
|
|
|
|
|
|
function esc($v) {
|
|
|
|
return isset($_REQUEST[$v]) ? htmlspecialchars($_REQUEST[$v]) : "";
|
|
|
|
}
|
2019-09-14 18:29:05 +00:00
|
|
|
|
2024-01-19 23:00:43 +00:00
|
|
|
function isGmail($email) {
|
|
|
|
return strpos($email, '@gmail.com') !== false;
|
|
|
|
}
|
2019-09-14 18:29:05 +00:00
|
|
|
|
2024-01-19 23:00:43 +00:00
|
|
|
$gmailError = false;
|
|
|
|
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
|
|
|
$email = esc('email');
|
|
|
|
if (isGmail($email)) {
|
|
|
|
$gmailError = true;
|
|
|
|
} else {
|
|
|
|
// Process the form here
|
|
|
|
include 'signup-handler.php';
|
|
|
|
}
|
|
|
|
}
|
|
|
|
?>
|
2019-09-14 18:29:05 +00:00
|
|
|
|
2024-01-19 23:00:43 +00:00
|
|
|
<h1 id="fancyboi">Sign up to join tilde.club</h1>
|
|
|
|
|
|
|
|
<div class="grid">
|
|
|
|
<div class="row">
|
|
|
|
<div class="col">
|
|
|
|
<p>We're excited you're here! Let's get you signed up!</p>
|
|
|
|
<p>Fill out this form and we'll get back to you with account info.</p>
|
|
|
|
<?php if ($gmailError): ?>
|
|
|
|
<p><strong>We don't accept Gmail addresses due to Google not allowing emails to go through due to a recent spam issue.</strong></p>
|
|
|
|
<?php else: ?>
|
|
|
|
|
|
|
|
<form method="post">
|
|
|
|
<div>
|
|
|
|
<p>Your desired username (numbers and lowercase letters only, no spaces)</p>
|
|
|
|
<input class="form-control" name="username" value="<?= esc("username") ?>" type="text" required>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div>
|
|
|
|
<p>Email to contact you with account info</p>
|
|
|
|
<input class="form-control" name="email" value="<?= esc("email") ?>" type="text" required>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<!-- Rest of your form fields -->
|
|
|
|
|
|
|
|
<button class="btn btn-primary" type="submit">Submit</button>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
</div>
|
2020-05-06 07:52:26 +00:00
|
|
|
</div>
|
|
|
|
|
2024-01-21 05:01:29 +00:00
|
|
|
<?php include __DIR__."/../footer.php";
|