diff --git a/src/server/cyberhex-code/system/secure_zone/php/profile.php b/src/server/cyberhex-code/system/secure_zone/php/profile.php index 057fde4..e654f46 100644 --- a/src/server/cyberhex-code/system/secure_zone/php/profile.php +++ b/src/server/cyberhex-code/system/secure_zone/php/profile.php @@ -12,7 +12,35 @@ $username = $_SESSION['username']; $perms = $_SESSION["perms"]; $email = $_SESSION["email"]; ?> +connect_error) { + $success=0; + die("Connection failed: " . $conn->connect_error); + } + $stmt = $conn->prepare("UPDATE users set email = ?, username = ? where username = ?"); + $stmt->bind_param("ssss", $email, $username_new, $username); + + $email=htmlspecialchars($_POST["email"]); + $username_new=htmlspecialchars($_POST["username"]); + $stmt->execute(); + $stmt->close(); + $conn->close(); + $username=$username_new; + $_SESSION["username"]=$username; + $_SESSION["email"]=$email; +} + +?> @@ -30,7 +58,7 @@ $email = $_SESSION["email"];

Your Profile ()

-
+
@@ -44,6 +72,13 @@ $email = $_SESSION["email"];
+ + Information updated successfully! +
'; + } + ?>