diff options
-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>'; } } ?> |