diff --git a/Script.php b/Script.php
index f664eee..16df7d3 100644
--- a/Script.php
+++ b/Script.php
@@ -1,7 +1,19 @@
+
query($sql) === TRUE) {
- $_SESSION["info_Admin_Users"] = $type . " user created successfully. Use email " . $email . " as account name and $password as password.";
+ // $file_name = $email.'.txt';
+ $_SESSION["info_Admin_Users"] = $type . " user created successfully. Use email " . $email . " as account name and ". $password ." as password.";
+ // file_put_contents('./acounts/'.$file_name, $_SESSION["info_Admin_Users"]);
+ //downloadFile($email);
header("Location: Admin.php");
+
} else {
- echo "Error: " . $sql . "
" . $con->error;
+ alert("Error: " . $sql . "
" . $con->error);
}
+
+}
+
+// ### FUNCTION TO GENERATE INITIAL PASSWORDS ###//
+function generateStrongPassword() {
+
+ $characters = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*()-_';
+ $password_length = 12;
+ $gen_password = '';
+ for ($i = 0; $i < $password_length; $i++) {
+ $random_index = mt_rand(0, strlen($characters) - 1);
+ $gen_password .= $characters[$random_index];
+ }
+
+ // Return the generated password
+ return $gen_password;
}
// #### FUNCTION CHECK FILE TYPES ////