I'm getting a header error while trying to add a line of code to a sendmail script.
I'm guessing I'm using the wrong method to do this.
What's the best way to bring in data such as an email address into a sendmail script with out getting the header error?
See code below, I want to pull in the [email protected] from a .php file to all the forms on the site. But includes causes a header error.
Thanks in advance.
Code Snipet:
<?php
$sitename = "Form from test.com";
$message = "This message was sent from: $sitename\n
mail( "[email protected]", $sitename, $message, "From: [email protected]" );
header( "Location: http://test.com/thankyou.php" );
?>
$message