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
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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.