Send pdf invoce with confirmation

Change-Id: Ie5b7b20043d11879f758af6536b55961314188eb
diff --git a/db_backend.php b/db_backend.php
index e1be86e..6876558 100644
--- a/db_backend.php
+++ b/db_backend.php
@@ -16,7 +16,7 @@
         global $DB, $DB_USER, $DB_PASS;
         $this->log = $log;
         try {
-            $this->pdo = new PDO($DB, $DB_USER, $DB_PASS);
+            $this->pdo = new PDO($DB, $DB_USER, $DB_PASS, array(PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES utf8") );
             if($log)
                 $log->info("Connected to database $DB");
         } catch (PDOException $e) {
@@ -34,6 +34,7 @@
                 $a[$key] = $value;
             }
         }
+        $a["participation_confirmed_at"] = date("Y-m-d H:i:s UTC");
         $keys = array_keys($a);
         $sql = "INSERT INTO person (" . implode(", ", $keys) . ") \n";
         $sql .= "VALUES ( :" . implode(", :", $keys) . ")";
@@ -42,7 +43,9 @@
         foreach ($a as $value)
             $q->bindParam($i++, $value);
         $this->log->debug($sql);
-        return $q->execute($a);
+        $res = $q->execute($a);
+        $user->id = $this->pdo->lastInsertId();
+        return $res;
     }
 
     function getColumnNames($table)