This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js and have Paul Jensen on-line!
See this thread for details.
Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

include files  RSS feed

 
Cynthia Yao
Ranch Hand
Posts: 92
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello.
I am working on a project, some section only allowed registered user to access. If the uses are not log in when they try to access those section, they will send to login page.
What I am think to do is do a include file which will check for session and cookie to determine the user, and redirect the use to login page if both information is not present.
However, I need to put the original request url into session valuable, so after the user login, they will get the same page. How could I refer to the url which include that test file??
Thanks. Did I explain it clearly?
 
Shankar Ganesh
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I too have a similar need -- I need to add a link to a page, (normally accessible after a login) in a mail and the user should be able to access the page if he is currently logged in. Else he should first be directed to the login screen and upon successful login, should be lead to the concerned page. How can this be achieved?
 
Brian Nice
Ranch Hand
Posts: 195
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check out this link: http://www.javaranch.com/ubb/Forum7/HTML/001290.html
Brian
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!