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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.