Phrase errors

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

]v[est

Thread Starter
Joined
May 1, 2001
Messages
41
Well im trying to make a very simple email script using PHP. For some reason i get phrase errors (specified below). I know line the phrase error is on is correct. Can anyone help me out here?
Heres what it looks like

if ($op != "ds"){
/* They need to see the form */
echo "$form_block";
}
else if ($op == "ds"){

if ($sender_name == ""){
$name_err = "<font color=red>Please enter your name!</font><br>";
$send = "no";
}

if ($sender_email == ""){
$email_err = "<font color=red>Please enter your email address!</font><br>";
$send = "no";
}

if ($message == ""){
$message_err = "<font color=red>Please enter a message!</font><br>";
$send = "no";
}

if ($send != "no"){
/* It's ok to send */
$msg = "E-Mail Sent From [1BEER6]\n";
$msg .= "Sender's Name: $sender_name\n";
$msg .= "Sender's E-Mail: $sender_email\n";
$msg .= "Message: $message\n\n;
$to = "[email protected]"; /* PHRASE ERROR OCCURS HERE!!! On this line*/
$subject = "I want to join [1BEER6]";
$mailheaders = "From: [1BEER6] <> \n";
$mailheaders .= "Reply-To:
$sender_email\n\n";
mail($to, $subject, $msg, $mailheaders);
echo "<p>Form has been sent!</p>";
}

else if )($send == "no"){

echo "$name_err";
echo "$email_err";
echo "$message_err";
echo "$form_block";
}
}

Thanks in advance.
 
Joined
Jan 11, 2002
Messages
2
The string being assigned to $msg is not properly terminated.

$msg .= "Message: $message\n\n;

should be:

$msg .= "Message: $message\n\n";


Hope this helps.
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 807,865 other people just like you!

Latest posts

Staff online

Top