From 7689e6d605fec099f62983bce33612b62b187fc5 Mon Sep 17 00:00:00 2001 From: Flatlogic Bot Date: Tue, 14 Oct 2025 11:54:32 +0000 Subject: [PATCH] 1.1 --- contact.php | 49 ++++++ index.php | 437 +++++++++++++++++++++++++++++++++++----------------- 2 files changed, 341 insertions(+), 145 deletions(-) create mode 100644 contact.php diff --git a/contact.php b/contact.php new file mode 100644 index 0000000..b2f59fb --- /dev/null +++ b/contact.php @@ -0,0 +1,49 @@ + false, 'message' => 'Invalid input.']); + exit; + } + + try { + $pdo = db(); + $stmt = $pdo->prepare("INSERT INTO contact_submissions (name, email, message) VALUES (?, ?, ?)"); + $stmt->execute([$name, $email, $message]); + } catch (PDOException $e) { + // In a real app, you would log this error. + http_response_code(500); + echo json_encode(['success' => false, 'message' => 'Database error.']); + exit; + } + + $to = getenv('MAIL_TO'); // You can set this in your .env file + $subject = 'New Contact Form Submission'; + + $emailBody = "

You have a new contact form submission:

" + . ""; + + $result = MailService::sendMail($to, $subject, $emailBody, strip_tags($emailBody), ['reply_to' => $email]); + + if ($result['success']) { + echo json_encode(['success' => true, 'message' => 'Message sent successfully!']); + } else { + // In a real app, you would log this error. + http_response_code(500); + echo json_encode(['success' => false, 'message' => 'Failed to send email.']); + } +} else { + http_response_code(405); + echo json_encode(['success' => false, 'message' => 'Method not allowed.']); +} diff --git a/index.php b/index.php index 7205f3d..1e55023 100644 --- a/index.php +++ b/index.php @@ -1,150 +1,297 @@ - - + - - - New Style - - - - - - - - - - - - - - - - - - - + + + TAP2SKILL - Learn. Hustle. Thrive. + + + + -
-
-

Analyzing your requirements and generating your website…

-
- Loading… -
-

AI is collecting your requirements and applying the first changes.

-

This page will update automatically as the plan is implemented.

-

Runtime: PHP — UTC

-
-
- + +
+ +
+ +
+
+
+

Learn. Hustle. Thrive.

+

Your journey to mastery starts here.

+ Explore Features +
+
+ +
+
+

About TAP2SKILL

+

TAP2SKILL is a modern learning platform designed to help you acquire new skills efficiently and effectively. We believe in a hands-on, project-based approach to learning that prepares you for real-world challenges.

+
+
+ +
+
+

Core Features

+
+
+

Skill Explorer

+

Discover new skills and learning paths tailored to your interests and career goals.

+
+
+

Video-Based Learning

+

Engage with high-quality video content from industry experts.

+
+
+

Project-Based Tasks

+

Apply what you learn with hands-on projects and real-world scenarios.

+
+
+
+
+ +
+
+

What Our Users Say

+
+
+

"TAP2SKILL helped me land my dream job. The project-based learning was a game-changer."

+

- Alex Doe

+
+
+

"I love the flexibility of the platform. I can learn at my own pace, anytime, anywhere."

+

- Jane Smith

+
+
+

"The instructors are top-notch. I've learned so much in such a short time."

+

- Sam Wilson

+
+
+
+
+ +
+
+

Contact Us

+
+ + + + +
+
+
+
+ + + + + - + \ No newline at end of file