aboutsummaryrefslogtreecommitdiff
path: root/src/archive_page.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/archive_page.php')
-rw-r--r--src/archive_page.php12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/archive_page.php b/src/archive_page.php
index bd1f872..9c37fb0 100644
--- a/src/archive_page.php
+++ b/src/archive_page.php
@@ -42,9 +42,19 @@
}
$WEBSITE_CATEGORY = 'page_url';
+ $DATABASE_NAME = 'db';
+ $TABLE_NAME = 'users';
$website_url = $_POST[$WEBSITE_CATEGORY];
$website_exists = does_website_exist($website_url) ? "true" : "false";
- echo "Website exists: $website_exists";
+ echo "Website exists: $website_exists" . "<br/>";
+
+ try {
+ $db = new PDO("mysql:host=localhost;dbname=$DATABASE_NAME", $user, $password);
+ echo $db->query("DESCRIBE $TABLE_NAME");
+ } catch (PDOException $e) {
+ print "Error!: " . $e->getMessage() . "<br/>";
+ die();
+ }
?>
</p>
</body>