Error in Form Hanlder

Okay. I’ve been able to get this php form handler to send me the emails…everything is right expect for 1 thing…

Everything except this line appears correctly in the form.
[php]$message .= “

Auto-Settlement ” . strip_tags($_POST[‘Settle’]) . “ Time ” . strip_tags($_POST[‘Time’]) . “ ”;[/php]

it ends up throwing the last value (" . strip_tags($_POST[‘Settle’]) . ") at the very top of the email, and not within the message body where it should be placed…any ideas…or can someone debug.

I’ve used the following website, but it says the code has no errors:
http://www.meandeviation.com/tutorials/learnphp/php-syntax-check/v4/syntax-check.php

Complete code below
[php]<?php
$to = ‘[email protected]’;

$subject = ‘Setup Sheet’;
$url = ‘http://www.domain.com/confirmation.html’;
$headers = “From: [email protected]\r\n”;
$headers .= “MIME-Version: 1.0\r\n”;
$headers .= “Content-Type: text/html; charset=ISO-8859-1\r\n”;
$message = ‘’;
$message .= ‘

’;
$message .= “”;
$message .= “”;
$message .= “”;
$message .= “”;
$message .= “”;
$message .= “”;
$message .= “”;
$message .= “”;
$message .= “”;
$message .= “”;
$message .= “”;
$message .= “”;
$message .= “”;
$message .= “”;
$message .= “”;
$message .= “”;
$message .= “”;
$message .= “”;
$message .= “”;
$message .= “”;
$message .= “”;
$message .= “”;
$message .= “<th colspan=‘4’;><align=‘right’>CheckList”;
$message .= “”;
$message .= “”;
$message .= “”;
$message .= “”;
$message .= “”;
$message .= “”;
$message .= “”;
$message .= “”;
$message .= “”;
$message .= “<tr style=‘background: #eee’;>”;
$message .= “<tr style=‘background: #eee’;>”;
$message .= “<tr style=‘background: #eee’;>”;
$message .= “<tr style=‘background: #ccc’;>”;

mail($to, $subject, $message, $headers);
echo ‘’;
?>[/php]

New Account Setup
Rep Name ” . strip_tags($_POST[‘ISRName’]) . “ Support Mgr Number ” . strip_tags($_POST[‘SupMgrNum’]) . “
ISR Bank ID ” . strip_tags($_POST[‘BankID’]) . “ Number of Locations ” . strip_tags($_POST[‘Locations’]) . “
&nbsp
Contact Details
Contact Name ” . strip_tags($_POST[‘Contact’]) . “ Contact Phone ” . strip_tags($_POST[‘CntPh’]) . “
Company Name ” . strip_tags($_POST[‘Company’]) . “ Company Phone ” . strip_tags($_POST[‘CmpPh’]) . “
&nbsp
Shipping/Terminal Information
Address ” . strip_tags($_POST[‘Address’]) . “
City ” . strip_tags($_POST[‘City’]) . " State:  " . strip_tags($_POST[‘State’]) . " Zip:  " . strip_tags($_POST[‘Zip’]) . “
Installation Type ” . strip_tags($_POST[‘Install’]) . “ Setup Type ” . strip_tags($_POST[‘Setup’]) . “
Terminal Type ” . strip_tags($_POST[‘Term’]) . “ Pinpad Encryption ” . strip_tags($_POST[‘PPEnc’]) . “
Connection Type ” . strip_tags($_POST[‘Connect’]) . “ PABX ” . strip_tags($_POST[‘Connect2’]) . “
Auto-Settlement ” . strip_tags($_POST[‘Settle’]) . “ Time ” . strip_tags($_POST[‘Time’]) . “
Default Report ” . strip_tags($_POST[‘Report’]) . “
Tips Processing? ” . strip_tags($_POST[‘Tips’]) . “ Server IDs? ” . strip_tags($_POST[‘ServerIDs’]) . “
Install Notes: ” . strip_tags($_POST[‘NotesIns’]) . “
&nbsp
Underwriting Information
Is this a Reapp? ” . strip_tags($_POST[‘Reapp’]) . “ Original MID ” . strip_tags($_POST[‘RMID’]) . “
Add Location? ” . strip_tags($_POST[‘AddLoc’]) . “ Original MID ” . strip_tags($_POST[‘AMID’]) . “
Voided Check? ” . strip_tags($_POST[‘Check2’]) . “ Signature and Initials ” . strip_tags($_POST[‘SigInit’]) . “
Debit Verified? ” . strip_tags($_POST[‘Debit2’]) . “ Pinpad? ” . strip_tags($_POST[‘Pinpad’]) . “
Tax ID Verified? ” . strip_tags($_POST[‘TaxID’]) . “ Tax ID Number ” . strip_tags($_POST[‘txid’]) . “
Equipment Paperwork? ” . strip_tags($_POST[‘EqpPpw2’]) . “ Avg Ticket/Volume? ” . strip_tags($_POST[‘AvgTktVol’]) . “
MSA/Lead Sheet Attached? ” . strip_tags($_POST[‘MSA2’]) . “ Equipment Indicated? ” . strip_tags($_POST[‘EquipType’]) . “
Existing AmEx #? ” . strip_tags($_POST[‘ExstAmex’]) . “ Amex # ” . strip_tags($_POST[‘Amex’]) . “
Application Completed? ” . strip_tags($_POST[‘CmptApp’]) . “
&nbsp
Merchant Type ” . strip_tags($_POST[‘RadioGroup1’]) . “ Surcharge Table ” . strip_tags($_POST[‘RadioGroup2’]) . “
Dues/Assmnts? ” . strip_tags($_POST[‘dues’]) . “Underwriting Notes: ” . strip_tags($_POST[‘NotesUnd’]) . “&nbspEnd of Sheet - New Account Setup

Syntax of that line doesn’t look wrong. You aren’t closing the table though, could just be an HTML compilation error on the email client’s part. Make sure the HTML you’re echoing is valid.

I’ve tested the email in both thunderbird and outlook, and they both have the same issues. I’ll try closing the table and see if that works.

Closing the table seems to have done the trick. Thanks!

Sponsor our Newsletter | Privacy Policy | Terms of Service