473,320 Members | 1,862 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

page redirection

Des
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

URL http://www.hopechurchuk.com/development

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

Desmond

Aug 13 '05 #1
3 1348
Des schrieb:
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

perhaps your on the wrong track whith your session var header('Location: $return); where $return is a copy of the variable
the page that has the problem is send.asp

I think you're looking for

$_SERVER['HTTP_REFERER'];
to achieve your goal:
in email.php
use
<input type="hidden" name="referer" value="<?php
echo($_SERVER['HTTP_REFERER']);"/>

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

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

Jo

Aug 13 '05 #2
Des wrote:
I have a web email contact us that if the cancel button is presed
it redirects to the home page.


Why?

--
Jock
Aug 13 '05 #3
Des
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.

Desmond.

Aug 13 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: Matt Adams | last post by:
A web page which exists for a couple of years under a certain address (e.g. http://www.aaa.com/bbb/ccc.html) is (should be) moved to another location (e.g....
0
by: itsharkopath | last post by:
Hi, Imagine a user in a hotspot, when he comes to the hotspot and tries to load a webpage (on the internet), he would automatically redirected to login page. I believe the following is to be...
0
by: James Wallace | last post by:
Is it possible to use forms authentication in the web.config file and FormsAuthentication.RedirectFromLoginPage with an asp page so that when the asp page is set to startup page on the project that...
4
by: Tim Marsden | last post by:
Hi, If I navigate from Page1 to Page2 then to Page3, using the response.redirect. When the user press the Back button, I what then to go to Page 1 and start again, not Page2. I dont want the...
6
by: MooreSmnith | last post by:
When I navigate to the next page using Response.Rediect("MyNextPage.aspx") current page Page_Load event is called. What I may wrongly understood is that post back will happen whenever there is any...
12
by: ACaunter | last post by:
Hi all, I was wondering how i could write some code which would automatically open the Login Page once the session has expired? -- AdamPC@hotmail.com
1
by: craigkenisston | last post by:
Hi, I recently read a lot about a topic called page hijacking. It seems that you can steal page rank from search engines while doing a redirect. I reminded I had a code in some pages, where...
2
by: Dr. Paul Caesar - CoullByte (UK) Limited | last post by:
Hi, I have created a Logout ASP.NET application using Forms Authentication. When a user logs out they get a confirmation page confirming logout and a button to click to return to the homepage....
10
by: Eric Lindsay | last post by:
This may be too far off topic, however I was looking at this page http://www.hixie.ch/advocacy/xhtml about XHTML problems by Ian Hickson. It is served as text/plain, according to Firefox...
6
by: =?Utf-8?B?YzY3NjIyOA==?= | last post by:
Hi all, We have two sites hosted on different servers and we have many pages on domain A which has many links(asp programs) to domain B. My question is if domain B server is in trouble, what is...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.