diff options
| author | Horus3 | 2014-09-25 10:33:47 +0200 |
|---|---|---|
| committer | Horus3 | 2014-09-25 10:33:47 +0200 |
| commit | 1fe76ba743a3418da9a0883b29756d442384d0bc (patch) | |
| tree | 091910ffd183d94c0f8b70a8f4c362f733033b03 /www/update.php | |
| parent | 2036626b560f22efd59673187a2de3b1319fcf8a (diff) | |
| download | jungegemeinde-1fe76ba743a3418da9a0883b29756d442384d0bc.tar.gz | |
init
Diffstat (limited to 'www/update.php')
| -rw-r--r-- | www/update.php | 26 |
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; - } -} |
