From 2ba4a6a8ee9310912b0b2c31091205ca844270d1 Mon Sep 17 00:00:00 2001 From: Flatlogic Bot Date: Tue, 9 Dec 2025 17:21:30 +0000 Subject: [PATCH] Auto commit: 2025-12-09T17:21:30.844Z --- contact.php | 48 ++++++++++++++++++++++++ db/migrate.php | 31 +++++++++++++++ db/migrations/001_create_users_table.sql | 12 ++++++ index.php | 5 ++- 4 files changed, 95 insertions(+), 1 deletion(-) create mode 100644 contact.php create mode 100644 db/migrate.php create mode 100644 db/migrations/001_create_users_table.sql diff --git a/contact.php b/contact.php new file mode 100644 index 0000000..8a050e2 --- /dev/null +++ b/contact.php @@ -0,0 +1,48 @@ +Thank you for your message. We will get back to you shortly.'; + } else { + $message = '
Sorry, there was an error sending your message. Please try again later.
'; + } +} +?> + + + + + + Contact Us + + + +
+

Contact Us

+

Fill out the form below to get in touch with us.

+ +
+
+ + +
+
+ + +
+
+ + +
+ +
+
+ + \ No newline at end of file diff --git a/db/migrate.php b/db/migrate.php new file mode 100644 index 0000000..08e2100 --- /dev/null +++ b/db/migrate.php @@ -0,0 +1,31 @@ +exec($sql); + echo "Success.\n"; + } catch (PDOException $e) { + echo "Error running migration: " . $e->getMessage() . "\n"; + // Exit on first error + return; + } + } +} + +run_migrations(); + diff --git a/db/migrations/001_create_users_table.sql b/db/migrations/001_create_users_table.sql new file mode 100644 index 0000000..c4e92cf --- /dev/null +++ b/db/migrations/001_create_users_table.sql @@ -0,0 +1,12 @@ + +CREATE TABLE IF NOT EXISTS `users` ( + `id` INT(11) NOT NULL AUTO_INCREMENT, + `username` VARCHAR(255) NOT NULL, + `email` VARCHAR(255) NOT NULL, + `password_hash` VARCHAR(255) NOT NULL, + `created_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, + `updated_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`id`), + UNIQUE KEY `username` (`username`), + UNIQUE KEY `email` (`email`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; diff --git a/index.php b/index.php index 33ebf9e..6cbbed0 100644 --- a/index.php +++ b/index.php @@ -59,6 +59,9 @@ error_reporting(E_ALL); + @@ -163,7 +166,7 @@ error_reporting(E_ALL);

Privacy Policy | Terms of Service | - Contact Us + Contact Us