Hello.
I was happily using the following script and everything was cool.
Them my ISP upgraded to PHP 5 and now my script will not work.
Basically, the redirection part of the script is fine, but the bit which sends the emails out does not work.
Could somebody please take a look and tell me what needs to change.
Thank you very much...
<?
$theirname = $_REQUEST['theirname'] ;
$theiremail = $_REQUEST['theiremail'] ;
$yourname = $_REQUEST['yourname'] ;
$youremail = $_REQUEST['youremail'] ;
$message = $_REQUEST['message'] ;
if (!isset($_REQUEST['message'])) {
header( "Location: index.html" );
}
elseif (empty($youremail) || empty($theiremail)) {
header( "Location: error.html" );
}
else {
mail( "$theiremail", "Message from $yourname",
"Dear $theirname,\n\n$yourname blah blah blah\n\n$message\n\nLots of love,\n\whatever.com",
"From: $yourname <$youremail>" );
mail("hello@whatever.com", "Someone's told a friend",
"Dear $theirname,\n\n$yourname blah blah blah\n\nSent by: $yourname $youremail\nSent to: $theirname $theiremail",
"From: [email]hello@whatever.com[/email]" );
header( "Location: index.html" );
}
?>