Hello folks,
Learning PHP here and I am using sendmail.php to send an email. I have setup my html contact form and I am using the following to send an email once a confirmation has been made:
however I keep getting the following error
Parse error: syntax error, unexpected ';' in C:\XAMPP\xampp\ htdocs\Requests \sendmail.php on line 33
any links or help would be greatly appreciated.
Learning PHP here and I am using sendmail.php to send an email. I have setup my html contact form and I am using the following to send an email once a confirmation has been made:
Code:
<?php
$to = "johnDoe@hotmail.com";
$tfirstName = $_REQUEST['fname'];
$tlastName = $_REQUEST['lname'];
$Zip = $_REQUEST['zip'];
$ReqDate = $_REQUEST['ReqDate'];
$EndDate = $_REQUEST['EndDate'];
$DutyStation = $_REQUEST['txtPDS'];
$TravPur = $_REQUEST['txtTDDS'];
$TNumb1 = $_REQUEST['TN1'];
$TNumb1 = $_REQUEST['TN2'];
$TYPE1 = $_REQUEST['TypeOpt'];
$TYPE2 = $_REQUEST['TypeOpt2'];
$POV = $_REQUEST['POV'];
$CAR = $_REQUEST['CAR'];
$TRANS = $_REQUEST['TRANS'];
$RIDE = $_REQUEST['Ride'];
$COMM = $_REQUEST['txtComments'];
$RfirstName = $_REQUEST['Rfname'];
$RLastName = $_REQUEST['Rlname'];
$SfirstName = $_REQUEST['Sfname'];
$SLastName = $_REQUEST['Slname'];
$SEmail = $_REQUEST['Semail'];
$temail = $_REQUEST['TEmail'];
$TravelNumber = date("YmdH:i a");
//$PNumber = $_REQUEST['Phone'];
// if($PNumber != ""){ $strno=$PNumber; } else { $strno="-"; }
$subject = "NEW GITGO TRAVEL REQUEST:";
$subject = &$TravelNumber;
$message = 'The Contacts Name is: '.$tfirstName.' '.$tlastName.;
$headers = "From: $email";
$sent = mail($to, $subject, $message, $headers) ;
header( "Location: http://159.142.143.13/requests/thankyou.html" );
if($sent)
{print "Your mail was sent successfully"; }
else
{print "We encountered an error sending your mail"; }
?>
Parse error: syntax error, unexpected ';' in C:\XAMPP\xampp\ htdocs\Requests \sendmail.php on line 33
any links or help would be greatly appreciated.
Comment