From 8f0a4321a812a7e7d58f438ce6d55afa881f92ec Mon Sep 17 00:00:00 2001 From: Flatlogic Bot Date: Sun, 28 Dec 2025 04:47:07 +0000 Subject: [PATCH] 12/27/25 V.17 --- apply.php | 65 -------------------- index.php | 173 +++++++++++++++++++++++++++++++++++++++++++++++++++--- 2 files changed, 166 insertions(+), 72 deletions(-) delete mode 100644 apply.php diff --git a/apply.php b/apply.php deleted file mode 100644 index 179ad4e..0000000 --- a/apply.php +++ /dev/null @@ -1,65 +0,0 @@ -prepare( - 'INSERT INTO applications (name, company, email, role) VALUES (?, ?, ?, ?)' - ); - $stmt->execute([$name, $company, $email, $role]); -} catch (PDOException $e) { - // In a real app, log this error. For now, redirect with a generic error. - error_log('DB Error: ' . $e->getMessage()); - header('Location: index.php?error=' . urlencode('A database error occurred.') . '#apply'); - exit; -} - -// 3. Email Notification -$to = getenv('MAIL_TO') ?: null; // Use admin email from .env -$subject = 'New FinMox Founding Access Application'; -$htmlBody = " -

New Application Received

-

A new application has been submitted for FinMox founding access:

- -"; -$textBody = "New Application:\nName: $name\nCompany: $company\nEmail: $email\nRole: $role"; - -// Use MailService, but don't block the user if it fails -try { - MailService::sendMail($to, $subject, $htmlBody, $textBody); -} catch (Exception $e) { - // Log email error but don't prevent user from seeing success - error_log('MailService Error: ' . $e->getMessage()); -} - - -// 4. Redirect to Success -header('Location: index.php?status=applied#apply'); -exit; - diff --git a/index.php b/index.php index 976b8f8..466b27d 100644 --- a/index.php +++ b/index.php @@ -637,13 +637,172 @@ - - + +