diff --git a/db_backend.php b/db_backend.php
new file mode 100644
index 0000000..5a92dc0
--- /dev/null
+++ b/db_backend.php
@@ -0,0 +1,78 @@
+<?php
+
+include_once "User.php";
+include_once "config.php";
+
+use \User as User;
+
+function open_db() {
+    global $DB, $DB_USER, $DB_PASS;
+    try {
+        # MS SQL Server and Sybase with PDO_DBLIB 
+        $DBH = new PDO($DB, $DB_USER, $DB_PASS);
+    }
+    catch(PDOException $e) {
+        echo $e->getMessage();
+    }
+    return $DBH;
+}
+
+function db_add_user(User $user)
+{
+    $DBH = open_db();
+    $columns = getColumnNames($DBH, "person");
+    foreach ((array) $user as $key => $value) {
+        if (array_key_exists($key, (array) $columns)) {
+            $a[$key] = $value;
+        }
+    }
+    $keys = array_keys($a);
+    $sql = "INSERT INTO person (".implode(", ",$keys).") \n";
+    $sql .= "VALUES ( :".implode(", :",$keys).")";
+    $q = $DBH->prepare($sql);
+    $i=1;
+    foreach($a as $value)
+        $q->bindParam($i++, $value);
+    print $sql. "\n";
+    return $q->execute($a);
+}
+
+function getColumnNames($dbh, $table)
+{
+    $sql = "SELECT COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE table_name = :table";
+    try {
+        $stmt = $dbh->prepare($sql);
+        $stmt->bindValue(':table', $table, PDO::PARAM_STR);
+        $stmt->execute();
+        $output = array();
+        while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) {
+            $output[$row['COLUMN_NAME']] = $row['COLUMN_NAME'];
+        }
+        return $output;
+    } catch (PDOException $pe) {
+        trigger_error('Could not connect to MySQL database. ' . $pe->getMessage(), E_USER_ERROR);
+    }
+}
+
+try {
+    # MS SQL Server and Sybase with PDO_DBLIB 
+    $DBH = new PDO($DB, $DB_USER, $DB_PASS);
+    $table = "person";
+    $sql = "SHOW COLUMNS FROM " . $table;
+    $stmt = $DBH->prepare($sql);
+    # $stmt->bindValue(':table', $table, PDO::PARAM_STR);
+    $stmt->execute();
+    $output = array();
+    while($row = $stmt->fetch(PDO::FETCH_NUM)){
+        $output[] = $row[0];
+        print $row[0] . "\n";
+        }
+    }
+  catch(PDOException $e) {
+      echo $e->getMessage();
+  }
+
+  $user=new User();
+  $user->username="test";
+  print $user->to_string();
+  db_add_user($user);
