DeanWhitehouse Posted May 4, 2008 Share Posted May 4, 2008 when i click on a members ID the navigation bar dissapears, the URL goes from members.php to members.php?id=18 this is my code <?php require_once 'includes/header.php'; require_once 'includes/db_connect.php'; ?><div class="bg"></div> <div class="clock"><?php echo gmdate('l, jS F Y');?> <span id="txt"></span></div> <div class="member"> <?php if ($_SESSION['is_valid'] == true){ if (isset($_GET['id'])) { if ((int) $_GET['id'] > 0) { $userid = $_GET['id']; $sql = "SELECT * FROM $user WHERE `user_id`='{$userid}' LIMIT 0,1;"; $result = mysql_query($sql); $row = mysql_fetch_assoc($result); $userprofname = $row['user_name']; $profemail = $row['user_email']; echo "$userprofname<br>"; $show_email = $row['show_email']; if (mysql_num_rows($result) < 1) { echo 'This ID does not exist in the database'; exit(); } if ($show_email == 1) { echo 'Email:<a href="mailto:'.$profemail.'"> Email Me</a>'; } elseif ($show_email == 0) { echo "Email: Hidden"; } exit(); } else { echo "Unknown User ID! <br />"; echo "<a href=\"members.php\">Return to Members Page</a>"; exit(); } } //No ID passed to page, display user list: $query = "SELECT user_id, user_name FROM $user"; $result = mysql_query($query) or die("Error:" . mysql_error()); if (mysql_num_rows($result) > 0) { echo "User List:<br />"; while ($row = mysql_fetch_assoc($result)) { echo '<a href="?id=' . $row['user_id'] . '">' . $row['user_name'] . '</a><br />'; } } } else { echo "Please login to view this page."; } ?> </div> <?php mysql_close(); require_once 'nav_bar.php'; require_once 'includes/footer.php'; ?> Quote Link to comment https://forums.phpfreaks.com/topic/104118-solved-nav-bar-disappearing-when-id18/ Share on other sites More sharing options...
DyslexicDog Posted May 4, 2008 Share Posted May 4, 2008 You say only part of your webpage doesn't show up. The content you do have is there information before and after it that still shows up? Quote Link to comment https://forums.phpfreaks.com/topic/104118-solved-nav-bar-disappearing-when-id18/#findComment-533051 Share on other sites More sharing options...
DeanWhitehouse Posted May 4, 2008 Author Share Posted May 4, 2008 on, members.php, everything that should show does, but on members.php?id=19, only the requires above the code are shown Quote Link to comment https://forums.phpfreaks.com/topic/104118-solved-nav-bar-disappearing-when-id18/#findComment-533055 Share on other sites More sharing options...
BlueSkyIS Posted May 4, 2008 Share Posted May 4, 2008 you've got a couple exit()s in there. it may be exiting before it gets to the bottom. Quote Link to comment https://forums.phpfreaks.com/topic/104118-solved-nav-bar-disappearing-when-id18/#findComment-533057 Share on other sites More sharing options...
DeanWhitehouse Posted May 4, 2008 Author Share Posted May 4, 2008 i managed to find a way around it, thanks for the replys Quote Link to comment https://forums.phpfreaks.com/topic/104118-solved-nav-bar-disappearing-when-id18/#findComment-533061 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.