Back Button

T

The Magnet

Hi,

I'm looking to change the location of where the page goes when someone
hits the back button.

I have a page which the user fills out a form, hits SUBMIT. It does
it's PHP thing, sends me the info, and then puts up a confirmation
page with a link to another page. At that point, if the user hits the
browsers 'BACK' button, it goes back, and I've put in a session
variable to re-direct the page using "header", but it still sends me
the confirmation again???

How can that be when I check for the session variable first thing:

<?
session_start();
if ($_SESSION['BACK'] == "Y") {
header("Location: feedback.php");
}

First thing in the page. It goes back to 'feedback.php' properly, but
not before sending me another email.

Any ideas why??
 
E

Eric Bednarz

The Magnet said:
I'm looking to change the location of where the page goes when someone
hits the back button.

You are looking for the right news group to post this to, too.
<?
session_start();
if ($_SESSION['BACK'] == "Y") {
header("Location: feedback.php");
}

First thing in the page. It goes back to 'feedback.php' properly, but
not before sending me another email.

You probably did not call exit or die after that, but that’s irrelevant.

You need to read RFC 2616. There you find status code 303 explained, and
why the location value in your header is invalid.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top