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??

Recommended Answers

All 6 Replies

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.

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

header('Location: URL');

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

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');

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.

thankx it works

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.