diff options
author | Cflip <36554078+cflip@users.noreply.github.com> | 2021-01-24 13:37:55 -0700 |
---|---|---|
committer | Cflip <36554078+cflip@users.noreply.github.com> | 2021-01-24 13:37:55 -0700 |
commit | d2909ea89f5cff052783006ee6596903e9881c73 (patch) | |
tree | 27d81c6647891001b9854f9a38389a0feefc821d | |
parent | 3b448bc3b3da97e7945dfc0bd05f91aa83d6e862 (diff) |
Make some changes to user page
-rw-r--r-- | user.php | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -12,10 +12,6 @@ if (!isset($_GET['id'])) { nobody_is_here(); } else { // If this is the user's own page, show the 'options' bar - if ($_SESSION['user_id'] == $_GET['id']) { - echo '<nav><a href=change_passw.php>Change Password</a>'; - echo '</nav>'; - } echo '<section>'; $sql = 'SELECT user_id, user_name, user_date FROM users WHERE user_id=?'; @@ -32,8 +28,12 @@ if (!isset($_GET['id'])) { if (!$user) { nobody_is_here(); } else { - echo '<div><h1 style="font-weight:normal">User: <b>'. $user['user_name'] .'</b><sub style="font-size: small;">ID#'. $user['user_id'] .'</sub></h1></div>'; - echo 'Registered since '. date('M d, Y', strtotime($user['user_date'])); + echo '<div><h1>'. $user['user_name'] .'</h1></div>'; + echo 'Member since '. date('M d, Y', strtotime($user['user_date'])); + } + + if ($_SESSION['user_id'] == $_GET['id']) { + echo '<br><p><a href=change_passw.php>Change Password</a></p>'; } } ?> |