page redirection

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
I have a web email contact us that if the cancel button is presed
it redirects to the home page. using

header('Location: index.php');

I have a session variable on every page which sets the a session
variable. What I want to do is

header('Location: $return); where $return is a copy of the variable
the page that has the problem is send.asp


there is a contact us at the top of all pages on the banner.
sorry if this is a bit confusing.


Re: page redirection

Des schrieb:
Quoted text here. Click to load it

perhaps your on the wrong track whith your session var
Quoted text here. Click to load it
I think you're looking for


to achieve your goal:

in email.php
<input type="hidden" name="referer" value="<?php

in send.php
if($_POST['submit']=="Cancel") {
  header("Location: $");
} else {
  // normal mail processing
  // sth. like thanks your mail this
// <a href="$">link</a> takes you where you've been

(script untested)

hope (which is almost certain at this site ;-)) it helps


Re: page redirection

Des wrote:

Quoted text here. Click to load it



Re: page redirection

This only works if the person sends a successful email. If he is
redirected back because some fields
were missing then the cancel button takes you to the email it'self.
Will have to investigate this further.


Site Timeline