Zubrag.com
October 19, 2018, 01:21:05 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: user dependant html for navigation and return issue  (Read 3647 times)
Tronder
Newbie
*
Posts: 2


« on: June 19, 2010, 07:56:38 PM »

I've been able to create user specific navigation in HTML such that if user A logs in they don't have a usable link to page 2. But if user B logs in they do have a usable link to page 2. And given that you've encryted both login and password, I am writing to a second unencryted cookie as well.

I am trying to pass the plain text login id to the second page, and once there the user has a link back to the first page. The problem is -

I am loosing the login when going to page 2 (am using a second password_protect.php file) such that when I return to page one, no login exists (it is now blank) and my if statement which looks at user and decides what set of HTML to use, doesn't work.

I've been trying to get it to read my second cookie with the unencrypted login and am unsure where to put the statement(s) to read the cookie if it exists. Tried several things and so far my new cookie is not getting read. Just not sure where in your code to do that so far.

This is my first foray into PHP and I'm learning as I go. Only just started this about two days ago. Been doing a LOT of Googling.

So to summarize - user A has access to page 1 only. They don't get a link to page 2. User B does have access to page 2 and gets the link to get there. On page 2 there is a link back to page 1. With the login getting lost, page 1 no longer knows who the user is and has to assume it's not user B, so the link to page 2 is no longer available.

And I really like what you've done. It's great that you share your knowledge. Thanks!!!

Logged
Tronder
Newbie
*
Posts: 2


« Reply #1 on: June 19, 2010, 11:42:35 PM »

Found my solution. Spent most of the day running through various trials. About an hour ago I thought I'd take another run at it and got it working as intended. I also should have posted in the regular (non-advanced forum I guess. Realized after that I was using the non-advanced version that I downloaded for free.

I most likely have useless code in place after all my trial and error but it's working so I'll not break it. But if others want to see I'll post. I'll check back periodically. Least I can do as I did gain some knowledge from reading other posts. Perhaps you can help me clean out the useless stuff.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC