Jump to content

redirect on session end


samoht

Recommended Posts

Hello all,

 

I tried to Google a answer for how to do a redirect on Session end with php but only asp came up (at least on the first 2 pages). So I thought I would ask here.

 

I would like to send users back to the home page if their session expires. I think this should be simple  - right??

 

Thanks for any help,

Link to comment
https://forums.phpfreaks.com/topic/188889-redirect-on-session-end/
Share on other sites

Yep, Sessions can be called on pages required using session_start(); , Note this must be the first line of every page that uses sessions, or it may not work. As well, do not output anything (echo/whitespace/html etc.) before this line of code, outside the php tags.

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.