Hmm, this is my script so far:
Code:// set the TO: email address
$to = '*********@cox.net';
// set the SUBJECT: e-mail
$subject = "An error has occured - type: $error_code";
// set the MESSAGE: e-mail
$message = "The following error has occured:\r\n"
."--------------------------------\r\n\r\n"
." Type: $error_code\r\n"
." Page: {$_SERVER['SERVER_NAME']}{$_SERVER['REQUEST_URI']}\r\n"
." Time: ".date('d/m/Y H:i:s')."\r\n"
." Referring Page: $referred_by = ( isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : 'Unknown' )\r\n"
." From IP: {$_SERVER['REMOTE_ADDR']}\r\n\r\n"
."Regards,\r\n"
."Your hard-working web server.";
$headers = "From: webserver@{$_SERVER['SERVER_NAME']}\n"
."Reply-To: webserver@{$_SERVER['SERVER_NAME']}\n"
."X-Mailer: PHP/".phpversion();
// send the email
mail( $to, $subject, $message, $headers );
Referring page of couse is being called as
Code:Referring Page: $referred_by = ( isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : 'Unknown' )
What have I done wrong?