Hi, there. The following is my .php file:
<?php
// Create local variables from the Flash ActionScript posted variables
$senderName = $_POST['userName'];
$senderEmail = $_POST['userEmail'];
$senderComments = $_POST['userComments'];
$senderSubject = $_POST['userSubject'];
$senderComanyName = $_POST['userCompanyName'];
$senderPhone = $_POST['userPhone'];
$senderFax = $_POST['userFax'];
$senderCity = $_POST['userCity'];
$senderAddress = $_POST['userAddress'];
$senderCountry = $_POST['userCountry'];
$senderQuery = $_POST['userQuery'];
$client_ip = $_SERVER['REMOTE_ADDR'];
// Strip slashes on the Local typed-in variables for security and run any php based error check here
$senderName = stripslashes($senderName);
$senderEmail = stripslashes($senderEmail);
$senderComments = stripslashes($senderComments);
$senderAddress = stripslashes($senderAddress);
$senderSubject = stripslashes($senderSubject);
$senderComanyName = stripslashes($senderCompanyName);
$senderPhone = stripslashes($senderPhone);
$senderFax = stripslashes($senderFax);
$senderCity = stripslashes($senderCity);
// IMPORTANT - Change these lines to be appropriate for your needs - IMPORTANT !!!!!!!!!!!!!!!!!!
$to = "makviswebsite@gmail.com";
$from = "$senderEmail";
$subject = "$senderSubject";
$message = "Results from the website form:
Query Type: $senderQuery
Subject: $senderSubject
Name: $senderName
Company Name: $senderCompanyName
Address: $senderAddress
City: $senderCity
Country: $senderCountry
Phone: $senderPhone
Fax: $senderFax
Email: $senderEmail
Comments: $senderComments "
// Build $headers Variable
$headers = "From: $from\r\n";
$headers .= "Content-type: text\r\n";
$to = "$to";
// Send the email
mail($to, $subject, $message, $headers);
if( mail( $to, $subject, $message, $headers ) )
{
echo 'answer=ok';
}
else
{
echo 'answer=bad';
}
// Exit script
exit();
?>
And I've been getting the following error:
Parse error: syntax error, unexpected T_VARIABLE in /home2/makvis/public_html/form_parse.php on line 48
Line 48 comes somewhere around $headers. Any help would be appreciated. Thanks in advance.