Email Contact form : how to go directly to a "Thank you" page?

Soldato
Joined
4 Feb 2004
Posts
13,430
Location
Écosse
I'm using FormToEmail.php for an online contact form on a website.

After the "Send" button is clicked, the script shows a blank white page saying "Thank you username. Your message has been sent. Click to Continue".

I have however, my own Thanks.html thank you page that I want to have display when the "Send" button is clicked instead of this blank white "Thank you" page that the script throws up. How can I achieve this?. I'm a newb at .php so I'm not sure what to amend in the script to have this happen.

Many thanks in advance. :)
 
I take it this (formtoemail.com) is the script you are using?

if so, find the following in the php script.

PHP:
mail($my_email,$subject,$message,$headers);

and add directly below it,

PHP:
header("Location: http://www.domain.com/thankyou.html");

obviously change the domain/location to wherever your "thank you" page is...
 
I take it this (formtoemail.com) is the script you are using?

if so, find the following in the php script.

PHP:
mail($my_email,$subject,$message,$headers);

and add directly below it,

PHP:
header("Location: http://www.domain.com/thankyou.html");

obviously change the domain/location to wherever your "thank you" page is...

Awesome!!!. That worked a treat. Cheers. :D
 
Back
Top Bottom