aboutsummaryrefslogtreecommitdiff
path: root/www/update.php
diff options
context:
space:
mode:
Diffstat (limited to 'www/update.php')
-rw-r--r--www/update.php26
1 files changed, 0 insertions, 26 deletions
diff --git a/www/update.php b/www/update.php
deleted file mode 100644
index 26c05ca..0000000
--- a/www/update.php
+++ /dev/null
@@ -1,26 +0,0 @@
-<?php
-
-function update_db($db){
-
- $id = SQLite3::escapeString(htmlentities($_POST["id"]));
- $name = SQLite3::escapeString(htmlentities($_POST["name"]));
- $adresse = SQLite3::escapeString(htmlentities($_POST["adresse"]));
- $telefonnummer = SQLite3::escapeString(htmlentities($_POST["telefonnummer"]));
- $handynummer = SQLite3::escapeString(htmlentities($_POST["handynummer"]));
- $email = SQLite3::escapeString(htmlentities($_POST["email"]));
- $bday = SQLite3::escapeString(htmlentities($_POST["geburtstag"]));
-
- if((!empty($id) && !preg_match("/^[0-9]+$/", $id)) || (!empty($telefonnummer) && !preg_match("/^[0-9]+$/", $telefonnummer) )|| (!empty($email) && !preg_match("/^.+@.+$/", $email))){
- return false;
- }
-
- if($db->exec("
- BEGIN TRANSACTION;
- UPDATE jg SET name='".$name."', adresse='".$adresse."', telefonnummer='".$telefonnummer."', handynummer='".$handynummer."', email='".$email."', geburtstag='".$bday."' WHERE id=".$id.";
- COMMIT;
- ")){
- return true;
- } else {
- return false;
- }
-}