mike177 Posted May 25, 2008 Share Posted May 25, 2008 Hi, I have my main menu in a php file to show the logged in and logged out menu. The problem is that I need the user id to be displayed as part of the profile.php link (profile.php?id=000000009). I can do this in normal html and I used to be able to do it in PHP but I've forgotton. Some help please, thanks in advance for any help. The first block of code is where I'm working. <?php if(isset($_COOKIE['id']) && isset($_COOKIE['sessionID'])){ echo "<a href=\"/app/signOut.php\">Sign Out</a> <a href=\"/app/account.php\">Account</a> <a href=\"/app/mail.php\">Mail</a> <a href=\"/app/groups.php\">Groups</a> <a href=\"/app/friends.php\">Friends</a> <a href=\"/app/profile.php?id=\">Profile</a> <a href=\"/app/home.php\">Home</a>"; } else{ echo "<a href=\"/app/signIn.php\">Sign In</a> <a href=\"/app/signUp.php\">Sign Up</a> <a href=\"/index.php\">Home</a>"; } ?> Link to comment https://forums.phpfreaks.com/topic/107147-php-menu-link/ Share on other sites More sharing options...
PC Nerd Posted May 25, 2008 Share Posted May 25, 2008 well wherever you want the id to be displayed: echo $_GET['id']; thats assuming that youve used profile.php?id=00000000009 or similar etc. gdlk Link to comment https://forums.phpfreaks.com/topic/107147-php-menu-link/#findComment-549429 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.