Page 1 of 1

email send error

Posted: Wed Apr 12, 2006 6:58 pm
by bruceg
I am getting an error with this email script I got from a PHP book, that I wanted to try out. I am not sure where the error is coming from.

Code: Select all

<?php
//who is the email going to?
$to="emailaddress@gmail.com";
//what is the message?
$message = "This is my first email message sent from PHP.\r\n"
                   ."This is a second line of text \r\n";
//who else do we want to send the message to?
$more_headers = "Cc:emailaddress@mindspring.com\r\n";
//send the email
$result=mail(
$to,
"my first email sent from PHP",
$message
$more_headers
);
?>
the error is


Parse error: syntax error, unexpected T_VARIABLE in email_send.php on line 6

Posted: Wed Apr 12, 2006 8:43 pm
by feyd
missing a comma on line 14.