dnzone Posted August 23, 2006 Share Posted August 23, 2006 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 More sharing options...
.josh Posted August 23, 2006 Share Posted August 23, 2006 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");} Link to comment https://forums.phpfreaks.com/topic/18373-auto-redirecting-to-other-pages/#findComment-79004 Share on other sites More sharing options...
dnzone Posted August 23, 2006 Author Share Posted August 23, 2006 Thank alot crayon, it help me a lot. Link to comment https://forums.phpfreaks.com/topic/18373-auto-redirecting-to-other-pages/#findComment-79042 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.