certainly thanks alot for helping. could my magic quotes be turned off on my server, would that effect my form.
<?PHP
######################################################
Forms To Go 3.1.0
######################################################
error_reporting(E_ERROR | E_WARNING | E_PARSE);
ini_set('track_errors', true);
function DoStripSlashes($FieldValue)
{
if ( get_magic_quotes_gpc() ) {
if (is_array($FieldValue) ) {
return array_map('DoStripSlashes', $FieldValue);
} else {
return stripslashes($FieldValue);
}
} else {
return $FieldValue;
}
}
#----------
FilterCChars:
function FilterCChars($TheString)
{
return preg_replace('/[\x00-\x1F]/', '', $TheString);
}
if (isset($SERVER['HTTP_X_FORWARDED_FOR'])) {
$ClientIP = $SERVER['HTTP_X_FORWARDED_FOR'];
} else {
$ClientIP = $_SERVER['REMOTE_ADDR'];
}
$FTGName = DoStripSlashes( $REQUEST['Name'] );
$FTGAddress = DoStripSlashes( $REQUEST['Address'] );
$FTGCompanyName = DoStripSlashes( $REQUEST['CompanyName'] );
$FTGPhone = DoStripSlashes( $REQUEST['Phone'] );
$FTGCell = DoStripSlashes( $REQUEST['Cell'] );
$FTGIndustry = DoStripSlashes( $REQUEST['Industry'] );
$FTGSales = DoStripSlashes( $REQUEST['Sales'] );
$FTGEmail = DoStripSlashes( $REQUEST['Email'] );
$FTGComments = DoStripSlashes( $REQUEST['Comments'] );
$FTGSubmit = DoStripSlashes( $REQUEST['Submit'] );
Include message in error page and dump it to the browser
if ($ValidationFailed === true) {
$ErrorPage = '<html><head><title>Error</title></head><body>';
$ErrorPage .= 'Errors found: <!--VALIDATIONERROR-->';
$ErrorPage .= '</body></html>';
$ErrorPage = str_replace('<!--VALIDATIONERROR-->', $ErrorList, $ErrorPage);
$ErrorPage = str_replace('<!--FIELDVALUE:Name-->', $FTGName, $ErrorPage);
$ErrorPage = str_replace('<!--FIELDVALUE:Address-->', $FTGAddress, $ErrorPage);
$ErrorPage = str_replace('<!--FIELDVALUE:CompanyName-->', $FTGCompanyName, $ErrorPage);
$ErrorPage = str_replace('<!--FIELDVALUEšhone-->', $FTGPhone, $ErrorPage);
$ErrorPage = str_replace('<!--FIELDVALUE:Cell-->', $FTGCell, $ErrorPage);
$ErrorPage = str_replace('<!--FIELDVALUE:Industry-->', $FTGIndustry, $ErrorPage);
$ErrorPage = str_replace('<!--FIELDVALUE:Sales-->', $FTGSales, $ErrorPage);
$ErrorPage = str_replace('<!--FIELDVALUE:Email-->', $FTGEmail, $ErrorPage);
$ErrorPage = str_replace('<!--FIELDVALUE:Comments-->', $FTGComments, $ErrorPage);
$ErrorPage = str_replace('<!--FIELDVALUE:Submit-->', $FTGSubmit, $ErrorPage);
echo $ErrorPage;
exit;
}
Email to Form Owner
$emailSubject = FilterCChars("factoring application");
$emailBody = "Name : $FTGName\n"
. "Address : $FTGAddress\n"
. "CompanyName : $FTGCompanyName\n"
. "Phone : $FTGPhone\n"
. "Cell : $FTGCell\n"
. "Industry : $FTGIndustry\n"
. "Sales : $FTGSales\n"
. "Email : $FTGEmail\n"
. "Comments : $FTGComments\n"
. "Submit : $FTGSubmit\n"
. "";
$emailTo = "application@vastfunding.com,application1@vastfunding.com";
$emailFrom = FilterCChars("application@vastfunding.com");
$emailHeader = "From: $emailFrom\n"
. "MIME-Version: 1.0\n"
. "Content-type: text/plain; charset=\"ISO-8859-1\"\n"
. "Content-transfer-encoding: 8bit\n";
mail($emailTo, $emailSubject, $emailBody, $emailHeader);
Include message in the success page and dump it to the browser
$SuccessPage = '<html><head><title>Success</title></head><body>';
$SuccessPage .= 'Form submitted successfully. It will be reviewed soon.';
$SuccessPage .= '</body></html>';
$SuccessPage = str_replace('<!--FIELDVALUE:Name-->', $FTGName, $SuccessPage);
$SuccessPage = str_replace('<!--FIELDVALUE:Address-->', $FTGAddress, $SuccessPage);
$SuccessPage = str_replace('<!--FIELDVALUE:CompanyName-->', $FTGCompanyName, $SuccessPage);
$SuccessPage = str_replace('<!--FIELDVALUEšhone-->', $FTGPhone, $SuccessPage);
$SuccessPage = str_replace('<!--FIELDVALUE:Cell-->', $FTGCell, $SuccessPage);
$SuccessPage = str_replace('<!--FIELDVALUE:Industry-->', $FTGIndustry, $SuccessPage);
$SuccessPage = str_replace('<!--FIELDVALUE:Sales-->', $FTGSales, $SuccessPage);
$SuccessPage = str_replace('<!--FIELDVALUE:Email-->', $FTGEmail, $SuccessPage);
$SuccessPage = str_replace('<!--FIELDVALUE:Comments-->', $FTGComments, $SuccessPage);
$SuccessPage = str_replace('<!--FIELDVALUE:Submit-->', $FTGSubmit, $SuccessPage);
echo $SuccessPage;
exit;
?>