Jump to content

auto redirecting to other pages


dnzone

Recommended Posts

Can anyone teach me how i can redirect my page for one page to another page automatically.

My senario is like this, I have a login page in which when the user login I will set the cookie and after 5 to 10 minutes my cookie will expire. And when the cookie expire I will redirect the page to an error page to tell the user that he or she need to login again. And from the error page I want it to automatically redirect itself to the login page so that the user can login again.

So how can i redirect my page from the error page to the login page automatically after a few second. Can anyone teach me. Thanks.
Link to comment
https://forums.phpfreaks.com/topic/18373-auto-redirecting-to-other-pages/
Share on other sites

i would make an html meta tag to automatically refresh the page after x amount of minutes

<meta http-equiv="refresh" content="600">

that would make it refresh after 10 minutes (600 seconds) then in my script i would check to see if the cookie is expired and if so, do a header to the new page

<?
//if cookie expired {
  header ("location: blah.php");
}

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.