Jump to content

PHP MENU LINK


mike177

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.