Help - Search - Members - Calendar
Full Version: Question on "header(refresh..."
Weborum Webmaster Forum > Web Page Design > PHP
Chris Elliott
I have an email contact form and on submitting, I want to load a "Thank you" page using the same target frame as the contact form. In otherwords, to replace the contact us page with a thank you page.

My current PHP script is:

[codebox]header( 'refresh: 1; url=thankyou.html'); # redirects to our thank you page[/codebox]

Which works, but rather than loading the thank you page in "_self", it opens that page in "_blank" (using HTML terms!).

Can anyone help?

Chris
Joe
Why don't you use a conditional statement to show a message when the form has been submitted?

CODE
<?php
if (!isset($_POST['submit']))
# if submit doesn't have a value
{
# display form
} else {
# process form and output thank you
}
?>
Chris Elliott
QUOTE(Joe @ May 6 2007, 10:14 AM) [snapback]36116[/snapback]
Why don't you use a conditional statement to show a message when the form has been submitted?

CODE
<?php
if (!isset($_POST['submit']))
# if submit doesn't have a value
{
# display form
} else {
# process form and output thank you
}
?>


Thanks! I might give this one a try. If I get totally lost, I'll come back here!!
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.