im trying to make a submission form for my schools JROTC and im running into some PHP problems. you can access the page http://www.berryrotc.com/index.php?option=com_wrapper&Itemid=43.
when you hit submit, it sends the information to a php script written below. now the error im getting is this:
Parse error: parse error, unexpected T_VARIABLE in /homepages/7/d209800957/htdocs/Berry JROTC/Links/Post_Contact_Form.php on line 25
here is the information for the php script that is having the error (note that line 25 starts with "$str = "Rank:"....
<?php
if (getenv(HTTP_X_FORWARDED_FOR))
{
$ip = getenv(HTTP_X_FORWARDED_FOR);
} else {
$ip = getenv(REMOTE_ADDR);
}
$adminEmail = "admin@berryrotc.com";
$subject = "Event Participation";
$Name = $_POST['Name'];
$Rank = $_POST['Rank'];
$LetLevel = $_POST['LetLevel'];
$ClassPeriod = $_POST['ClassPeriod'];
$Softball = $_POST['Softball'];
$Fieldday = $_POST['Fieldday'];
$FtFisher = $_POST['FtFisher'];
$Comments = $_POST['Comments'];
$finalMessage = "$rank $name would like to participate in an upcoming event. More information below.\n\nRank: $rank \nName: $name \nLet Level: $letlevel \nClass Period: $classperiod \nEvents to participate in: \n Softball: $Softball \n Field Day: $fieldday \n Fort Fisher: $ftfisher \n\n\nComments: $comments;"
$str = "Rank: $Rank \nName: $Name \nLetLevel: $LetLevel \nClass Period: $ClassPeriod \nSoftball: $Softball \nField Day: $Fieldday \nFort Fisher: $FtFisher \n\n\nComments: \n$Comments";
$out = fopen("backup_contact_form.txt", "a+");
mail($adminEmail, $subject, $finalMessage);
fwrite($out, $str);
fclose($out);
echo "<font color=\"white\">Thank you for signing up for JROTC Events. Your name will be added to the roster shortly!</font>";
?>