Parse error

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
johnh
Forum Newbie
Posts: 3
Joined: Mon Apr 22, 2002 10:48 am
Location: ohio

Parse error

Post 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>
g-force2k2
Forum Newbie
Posts: 12
Joined: Thu Apr 18, 2002 8:15 pm

Post 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?
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post 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."
";
Matta
Forum Newbie
Posts: 4
Joined: Thu Feb 05, 2004 10:42 am

Post by Matta »

Sorry, bad post-thought i was posting on an old thread
Last edited by Matta on Mon Feb 16, 2004 12:05 am, edited 1 time in total.
Illusionist
Forum Regular
Posts: 903
Joined: Mon Jan 12, 2004 9:32 pm

Post by Illusionist »

what the hell is that for?
Post Reply