I have a form which submits and /should/ reroute to a thankyou.html page.
Below is the script I’m using:
<?php
$name = $_REQUEST['name'] ;
$email = $_REQUEST['email'] ;
$message = $_REQUEST['message'] ;
mail( "myemail@gmail.com", "Feedback Form Results",
$message, "From: $email" );
header( "thankyou.html" );
?>
The thankyou page definitely exists and works correctly, is there something I’m missing?
Yes.
headersets an HTTP header, it doesn’t redirect. You can, however, use it to redirect to a page by setting the Location header.A note about relative URLs when using the Location header: