about summary refs log tree commit diff stats
path: root/store/browser/db.php
diff options
context:
space:
mode:
Diffstat (limited to 'store/browser/db.php')
-rw-r--r--store/browser/db.php23
1 files changed, 23 insertions, 0 deletions
diff --git a/store/browser/db.php b/store/browser/db.php
new file mode 100644
index 0000000..bfe73d8
--- /dev/null
+++ b/store/browser/db.php
@@ -0,0 +1,23 @@
+<?php
+
+$db = new PDO('sqlite:db_websites.sqlite3');
+
+$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
+
+$query = "CREATE TABLE IF NOT EXISTS websites
+(id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
+    login_name TEXT
+)";
+
+$db->exec($query);
+
+function cleanText($value) {
+	$value = strip_tags($value);
+	$value = htmlentities($value, ENT_QUOTES, "UTF-8");
+	$value = trim($value);
+	$value = stripslashes($value);
+	$value = strval($value);
+	return $value;
+}
+
+?>
\ No newline at end of file