Jump to content

Archived

This topic is now archived and is closed to further replies.

marshall

Session problem

Recommended Posts

Well, it's very simple..

I have a session with a expiring time...

When session expire, I would like to redirect the site...

Which variable should I set or which function should I use ?

Share this post


Link to post
Share on other sites
If you want to have a expire time, then I would suggest you to use cookie.

Share this post


Link to post
Share on other sites
[quote author=hackerkts link=topic=102443.msg406489#msg406489 date=1154356631]
If you want to have a expire time, then I would suggest you to use cookie.
[/quote]
Sessions does use a cookie!

Also marshall I dont think what you are trying to do is possible.

Share this post


Link to post
Share on other sites
Yess sessions does have time limit until the session timesout, however redirecting the user when the session expires isnt possble I dont think, that is what I meant.

Share this post


Link to post
Share on other sites
Ok, thanks for the explaination.
And I still think he should use a cookie instead of session, since you can set the seconds until the cookie ends and will redirect to other page as marshall mention.

Share this post


Link to post
Share on other sites
I do not have shoure but i guess you mush change the value (seconds) "session.cookie_lifetime" in your php.ini file that is set as 0 as default. - expires when user closes the browser. Maybe you would have to check if a var is set, and if not redirect with something like <script>window.location="www.something.com";</script>

Do not know if it would work.

Share this post


Link to post
Share on other sites
[quote author=hackerkts link=topic=102443.msg406505#msg406505 date=1154357647]
Ok, thanks for the explaination.
And I still think he should use a cookie instead of session, since you can set the seconds until the cookie ends and will redirect to other page as marshall mention.
[/quote]

You can certainly set the time until a cookie expires but it still won't cause anything to be redirected.

Share this post


Link to post
Share on other sites

×

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.