aboutsummaryrefslogtreecommitdiff
path: root/www/update.php
diff options
context:
space:
mode:
Diffstat (limited to 'www/update.php')
-rw-r--r--www/update.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/www/update.php b/www/update.php
index 04df988..67a92a1 100644
--- a/www/update.php
+++ b/www/update.php
@@ -10,7 +10,7 @@ function update_db($db){
$email = SQLite3::escapeString($_POST["email"]);
$bday = SQLite3::escapeString($_POST["geburtstag"]);
- if(!preg_match("/^[0-9]+$/", $id) || !preg_match("/[0-9]+$/", $telefonnummer) || !preg_match("/^.+@.+$/", $email)){
+ if((!empty($id) && !preg_match("/^[0-9]+$/", $id)) || (!empty($telefonnummer) && !preg_match("/^[0-9]+$/", $telefonnummer) )|| (!empty($email) && !preg_match("/^.+@.+$/", $email))){
return false;
}