Jump to content

Passing variable to outgoing link


awakedesignstudios

Recommended Posts

so $_SESSION would be the variable thats storing the username? or username storing the variable, and $_SESSION is inputting it into the link?  im new to this php world....somehow i need to store a variable based on the user that is logged in, and pass the user variable into the link when its clicked...so if

print '<a href="http://domain/page.php?user=' . $_SESSION['username'] . '">click</a>';

puts the username into the link, how would i store the user variable in the first place?

Link to comment
Share on other sites

so use a form?  doesnt that mean the very next page has to be the link one?  if im going to use the username var on different pages, will POST remember?  someone on another forum suggested i use cookies to store the username.  im using this in joomla, so i think i have the edit the built in login module to track the username coookie somehow, not sure how yet though.  do u know anything about customizing joomla and its extensions?

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.