Jump to content

Setting session variable in a hyperlink?


Perad

Recommended Posts

My new site has 2 columns. The larger left side contains the blog. This transfers page's using $_GET and URL's.

 

My right column will contain profiles, registering, login-ins etc. I want this to use sessions to work out what page to display. This way things can come and go on the right column without disrupting the blog side of things.

 

The problem I am having is actually setting the session variable which this will run off. For example if I want to view someone's profile, it would typically be done in a link i.e. blog?viewprofile=John. This would disrupt the blog as you would go back to the index page.

 

I have thought about using hidden form fields but this seem's like a lot of hard work for what i would like to achieve. Before I go off making my site a complex form is there any other way to set sessions without using the URL to trigger events?

 

 

Link to comment
https://forums.phpfreaks.com/topic/54263-setting-session-variable-in-a-hyperlink/
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.