Jon Truelson - 2005-02-13

I have built a form that via your (very fine) script, inserts a database record AND sends 2 emails containing field values to the DB owner.  The database aspect is working flawlessly.  However, the email script I added to the end of inewformsubmit script occasionally sends only blank field values (one out of every six or so submitted forms).

The database records are always inserted correctly, thus no form information is lost.  Being an intermittent problem, I have not been able to replicate this in any of my test submissions.

Script added to newformsubmit to handle email:

<?php
mail("jtruelson@trumedia.info","Information Request","Name: $thisRealnameField\n\nEmail: $thisEmailField\n\nAddress: $thisAddress\n\nCity: $thisCityField\n\nState/Country: $thisStateField\n\nZip/Postal Code: $thisZipField\n\nPhone: $thisPhoneField\n\nProspect/Customer Default set to:$thisP_or_CField\n\nDate of Inquiry: $thisDate_enteredField", "From: $thisRealnameField <$thisEmailField>") or
    die("email error");
    echo "<BR>Inquiry Submitted";
mail("info@trumedia.info","Information Request","Name: $thisRealnameField\n\nEmail: $thisEmailField\n\nAddress: $thisAddress\n\nCity: $thisCityField\n\nState/Country: $thisStateField\n\nZip/Postal Code: $thisZipField\n\nPhone: $thisPhoneField\n\nProspect/Customer Default set to:$thisP_or_CField\n\nDate of Inquiry: $thisDate_enteredField", "From: $thisRealnameField <$thisEmailField>") or
    die("email error");
    echo "<BR>Thank You!";   

?>

Any thoughts as to what is triggering occasional blank email? (special charecters?, punctuation?hijack attempts?)

I am validating required fields via javascript.
Running php 4.3.1. 

Would turning off magic quotes help?  Would security be compromised in doing so?

Any thoughts on this would be most welcome.
-Jon Truelson