diff --git a/www/M2-09-users.dat b/www/M2-09-users.dat
new file mode 100644
index 0000000..ed61098
Binary files /dev/null and b/www/M2-09-users.dat differ
diff --git a/www/public/M2/05/handle.php b/www/public/M2/05/handle.php
index 0cffec9..35f0211 100644
--- a/www/public/M2/05/handle.php
+++ b/www/public/M2/05/handle.php
@@ -12,23 +12,30 @@
if(isset($_POST["username"])) $username = $_POST["username"];
if(isset($_POST["password"])) $password = $_POST["password"];
- $name = cleanData($name);
- $surname = cleanData($surname);
- $username = cleanData($username);
- $password = cleanData($password);
+ $name = strip_tags($name);
+ $name = htmlspecialchars($name);
+ $name = trim($name);
+ $name = stripslashes($name);
+
+ $surname = strip_tags($surname);
+ $surname = htmlspecialchars($surname);
+ $surname = trim($surname);
+ $surname = stripslashes($surname);
+
+ $username = strip_tags($username);
+ $username = htmlspecialchars($username);
+ $username = trim($username);
+ $username = stripslashes($username);
+
+ $password = strip_tags($password);
+ $password = htmlspecialchars($password);
+ $password = trim($password);
+ $password = stripslashes($password);
echo "Name: " . $name . "
";
echo "Surname: " . $surname . "
";
echo "Username: " . $username . "
";
echo "Password: " . $password . "
";
-
- function cleanData($data) {
- $data = strip_tags($data);
- $data = htmlspecialchars($data);
- $data = trim($data);
- $data = stripslashes($data);
- return $data;
- }
?>