Page 1 of 1

Parse error

Posted: Mon Apr 22, 2002 8:42 pm
by johnh
can some one tell me what i am doing wrong here. here is the code :lol:
<?

//email form//

//this is where we take the drop down from the fom and select the right input//
//formailer//
switch ($input){
case "1" : $to="sarahr@gcchristian.org"; break;
case "2" : $to="jennifers@gcchristian.org"; break;
case "3" : $to="pame@gcchristian.org"; break;
case "4" : $to="brenth@gcchristian.org"; break;
case "5" : $to="kim_@gcchristian.org"; break;
case "6" : $to="kims@gcchristian.org"; break;
case "7" : $to="codyp@gcchristian.org"; break;
case "8" : $to="melissaa@gcchristian.org"; break;
case "9" : $to="jefft@gcchristian.org"; break;
case "10" : $to="mollyb@gcchristian.org"; break;

}


$name=trim("$name");
$email=trim("$email");
$comments=("$comments");

$mailcontent = "Name: ".$name."
"
."Email: ".$email."
"
."Comments: ".$comments."
"
."fromaddress ".$fromaddress."
"
."to ".$to."
:
//now we mail the contents of the form//
mail($to, $mailcontent, $from);
?>
<html>
<head>
<title><----Thank You For Chooseing Us----></title>
</head>
<body>
<h1>Your Form Has Been Submited</h1>
<p>Your form has been sent to <? echo $to; ?></p>
<p><? echo nl2br($mailcontent); ?>
You will hear from us by email or phone ASAP<BR>
Thank You For alowing God to work through you.<br>
Eternally His <BR>
Grove City Christian Church <BR>
</body>
</html>

Posted: Mon Apr 22, 2002 9:00 pm
by g-force2k2
umm... does it say what line the error is on? i believe this might be the mistake ;D not positive im only a beginner... but change this code...

Code: Select all

."to ".$to."
:
to this...

Code: Select all

."to ".$to."
"
maybe that'll help?

Posted: Tue Apr 23, 2002 2:21 am
by twigletmac
g-force2k2 wrote:

Code: Select all

."to ".$to."
:
to this...

Code: Select all

."to ".$to."
"
You also need to add a semi-colon (;) to the end of that line so it should be:

Code: Select all

."to ".$to."
";

Posted: Sun Feb 15, 2004 11:00 pm
by Matta
Sorry, bad post-thought i was posting on an old thread

Posted: Sun Feb 15, 2004 11:13 pm
by Illusionist
what the hell is that for?