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
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");
}

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.