You must complete the following fields:
';
if(empty($_GET['address']))echo'
Your friend\'s email address';
if(empty($_GET['YourName']))echo'
Your Name';
if(empty($_GET['email']))echo'
Your email address';
echo "
";
}
elseif(strstr($_GET['address'], '@') && !strstr($_GET['address'], ',') && (strlen($_GET['address']) < 56 ) ){
include('dataedit/sql.php');
$subject = 'A Recommendation from '.mysql_real_escape_string($_GET['YourName']);
$headers = "From: ".mysql_real_escape_string($_GET['YourName'])." <".mysql_real_escape_string($_GET['email']).">\n";
$headers.= 'bcc:heritage@easynet.co.uk';
$message = mysql_real_escape_string($_GET['YourName']).
' Visited www.information-britain.co.uk and thought you would like to see this page'.
"\n\nhttp://www.information-britain.co.uk/{$_GET['place']}";
$and = '';
foreach($_GET AS $get => $val){
if(!in_array($get, array('comments','email','address','place','YourName','submit'))){
$message .= "$and$get=$val";
$and = '&';
}
}
if(!empty($_GET['comments']))$message.="\n\nTheir Comments: ".mysql_real_escape_string($_GET['comments']);
$insertmail = mysql_query("INSERT INTO mail (`to`, subject, message, headers) VALUES ('".mysql_real_escape_string($_GET['address'])."', '$subject', '$message', '$headers')") or mail('mail@rolty.co.uk', 'postpage2 Failure', mysql_error(), 'From:sql@information-britain.co.uk');
//mail($_GET['address'], $subject, $message, $headers);
echo'