Welcome to Server Circle. It's a friendly site and all levels of experience are welcome. Be aware that we use cookies for your login.
Server Circle - Ask questions about Servers and get answers from experts.
Beta (0.17 sec)
How do I store the last page viewed in a PHP session ?

I can't see a way to store a page URL in a session so I can jump back to it.

What am I missing ?

Thanks.
Asked by:
JackFlash
378 points
 Report Abuse
 Share Page - Category: Programming - Tags: How do I store the last page viewed in a PHP session ?
 Enter your response
Please use Pastie.org to paste lengthy code or to fix formatting issues with code
  • Responses in reverse (1)

Best Answer

You would need to store the output of the below code in a cookie or some other way.

(!empty($_SERVER['HTTPS'])) ? "https://\".$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'] : "" target=_blank title="http://\".$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'];">" title="http://\".$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'];" target=_blank>http://\".$_SERVER['SERVE ...


Response by:
apjone
1478 points


  • Related Questions
About Us : Contact Us : Etiquette : Terms : CDN Failover : ShorterURL : CDN Fallback : © 2013 Server Circle