How to Remove Login Status from a Clickable Link

3 replies
Trying to think of a good way to describe this...

I know it's possible because I remember a programmer helped me with this about like 15 years ago or something.

Imagine someone logs in to a password protected page on your website. We'll call that Login #1.

Then within that page, you have another link that says "Go Login Here" and when they click that link they arrive at the new page but are STILL logged in to what they were logged into already.

What can I put in the url string that when they click the link, the user is "cleared" from their login of the page they were logged into and brought to another page with a username and password login page when they click on link so that Login #2 displays?

a href="http://whateverwhatever.wha?removeloginsomething">Login Here/a
#clickable #link #login #remove #status
  • Profile picture of the author kevbo22
    Just use different session variables. When you check to see if the user is logged in or not... Very easy
    So basically you dont need any variables in your url. Just run an if statement to check the session variables. On each login make the user session different for each login page.
    Nice to see another person in Denver

    The best path to prosperity is free market capitalism!

    {{ DiscussionBoard.errors[10382575].message }}
  • Profile picture of the author cmcguinness
    You have to start with knowledge of how the program is tracking that the user is logged in. Most web sites use cookies. Your task, then, is to clear that cookie so that the web site no longer thinks the user is logged in. There's no way to do that from a URL, but you can put some javascript on the link that will take care of that for you. There is a good explanation at this web site of how to manipulate cookies.
    {{ DiscussionBoard.errors[10382801].message }}
  • Profile picture of the author rts2271
    If this is inside a CMS system its a configuration issue.
    If this is some form of web script it sounds like http auth access possibly

    There is really not enough information here. What are you using on the backend, what auth method, is there a cms underlying it
    {{ DiscussionBoard.errors[10385514].message }}

Trending Topics