954,568 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

problem in Login

in my website,after someone login,his profile appears.
The prolem comes when you shift to another web page
and if you want to return to you profile this message appeares
(Warning: Page has Expired The page you requested was created using information you submitted in a form. This page is no longer available. As a security precaution, Internet Explorer does not automatically resubmit your information for you.
To resubmit your information and view this Web page, click the Refresh button. )

how can i solve this problem????????
so that when you need to get back it will bring you to your profile??

mrcniceguy
Posting Whiz in Training
283 posts since Mar 2008
Reputation Points: 17
Solved Threads: 8
 

Using the back button to go to a page form data was submitted to will cause this, to solve it, once the login script has been run either use a header redirect or a meta redirect to clear the POST data.

Will Gresham
Master Poster
755 posts since May 2008
Reputation Points: 96
Solved Threads: 125
 

thankx for your reply but i`m very new to this can you show me how to use header to redirect?

mrcniceguy
Posting Whiz in Training
283 posts since Mar 2008
Reputation Points: 17
Solved Threads: 8
 
header('Location: URL');

Make sure that you put this at the top of the file before any HTML tags.

Will Gresham
Master Poster
755 posts since May 2008
Reputation Points: 96
Solved Threads: 125
 

so this i`ll put in the login script?
and in the other pages?
Do you mean like this ??
header ('Location:http://localhost/login.php');

mrcniceguy
Posting Whiz in Training
283 posts since Mar 2008
Reputation Points: 17
Solved Threads: 8
 

on the page that sets the cookies/sessions, add this to the top:

<meta http-equiv="refresh" content="5"/>

This will reload the page and clear POST data. Looking again, the header function probably will not work in this instance.

Will Gresham
Master Poster
755 posts since May 2008
Reputation Points: 96
Solved Threads: 125
 

thankx it works

mrcniceguy
Posting Whiz in Training
283 posts since Mar 2008
Reputation Points: 17
Solved Threads: 8
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You