diff --git a/user/account.php b/user/account.php index e2484ba..cf8e327 100644 --- a/user/account.php +++ b/user/account.php @@ -69,10 +69,12 @@ try { // Try opening the SQL database connection
My Account"; - } else { - echo "

$username's Account

"; + if (isset($_SESSION["userID"])) { + if (mb_strtolower($username) == mb_strtolower($_SESSION["username"])) { + echo "

My Account

"; + } else { + echo "

$username's Account

"; + } } ?>
@@ -103,36 +105,38 @@ try { // Try opening the SQL database connection -

Edit

-

-
-

Twitch (name):

-

YouTube (name):

-

YouTube (link):

-

Discord (name):

-

Discord (UserID):

-

 

-

Change Password

-

(coming soon!)

-
-
-
-

-

-

-

-

+ if (isset($_SESSION["userID"])) { + if (mb_strtolower($username) == mb_strtolower($_SESSION["username"])) { + echo (" +
+

Edit

+

+
+

Twitch (name):

+

YouTube (name):

+

YouTube (link):

+

Discord (name):

+

Discord (UserID):

 

-
- -
- +

Change Password

+

(coming soon!)

+
+
+
+

+

+

+

+

+

 

+
+ +
+
+
-
- "); + "); + } } else { echo ("
diff --git a/user/user.php b/user/user.php index 2d01a2e..27f4894 100644 --- a/user/user.php +++ b/user/user.php @@ -22,7 +22,6 @@ try { // Try opening the SQL database connection if (isset($results)) { if (mb_strtolower($_GET["username"]) != mb_strtolower($results["username"])) { $userExists = false; - echo "NO USER"; } else { $userExists = true; } @@ -73,7 +72,7 @@ try { // Try opening the SQL database connection echo "

USER NOT FOUND!

"; echo "

This person may have played some games with us, but hasn't registered an account yet.

"; echo "

Please check back later!

"; - echo "

"; + echo "

 

"; echo "
"; } ?> @@ -98,6 +97,9 @@ try { // Try opening the SQL database connection // If someone is logged in, give them the opportunity to log out if (isset($_SESSION["userID"])){ echo "LOGOUT"; + } else { + echo "SIGN IN"; + echo "CREATE AN ACCOUNT"; } ?>