1) {$Path .= "../"; --$depth;} unset($path); $path = $Path; $sendername = $_POST['sendername']; $senderemail = $_POST['senderemail']; $subject = $_POST['subject']; $note = $_POST['note']; // if Send Mail Button is pressed - send the mail if ($_POST['send'] == "Send Mail") { // ERROR TRAPPING =============================================== // Email Addr Trap - no @ in the field if (filter_var($senderemail, FILTER_VALIDATE_EMAIL)) {} else {$ERR = "ADDRfrom";} if($senderemail == "") { $ERR = "ADDRfrom"; } // Empty Required Field Trap if(($sendername == "") || ($note == "")) { $ERR = "Data"; } // Is HTML code in the "$note" field ? if(strlen($note) != strlen(strip_tags($note))) { $ERR = "html"; } // If NO ERRORS - Proceed to Send Email if ($ERR == "") { // SENDMAIL ===================================================== if ($subject == "") { $subject = "From DMS Website:"; } if ($subject != "") { $subject = "DMS: ".$subject; } $note = stripslashes($note); $sendername = stripslashes($sendername); $subject = stripslashes($subject); $signature = " ---------------------------------------- Digital Music Services www.digitalmusicservices.com"; mail ( "info@digitalmusicservices.com","$subject", "Name: ".$sendername . "\r\n" . "Email: ".$senderemail . "\r\n\r\n" . "Subject: ".$subject . "\r\n----------------------------------------\r\n" . $note . "\r\n" . $signature, "From: $senderemail\n" ); // Log this $LogEntry = "Email"; include ($Path."LogGen.php"); $ERR = "SENT"; } // RESULT MESSAGE ================================== // OnClick=\"Javascript:location.href='http://www.digitalmusicservices.com/Home.php';\" if ($ERR != "") {echo " Digital Music Services EMAIL




"; } // SUCCESS: Email SENT //$hidden = "1"; echo "Code: $ERR $hidden
"; if (($ERR == "SENT") && ($hidden != "1")) {echo "

Thank you for contacting us.

Your Email has been sent.
We'll respond as soon as possible.

 
"; $hidden = "1";} //else { Javascript:location.href='http://www.digitalmusicservices.com/Home.php';} //echo "Code: $ERR $hidden
"; /*    */ // Failure: Invalid REQUIRED DATA if ($ERR == "html") { echo "

 ERROR:   HTML Code Is Not Allowed

Please remove any HTML code and try again

   
"; } if ($ERR == "Data") { echo "

 ERROR:   REQUIRED INFORMATION INCOMPLETE

Please Fill all required entries and try again

   
"; } // Failure: Invalid TO address ---- *** MJS Note: "ADDRto" isn't a used Var anywhere and could be removed *** if ($ERR == "ADDRto") { echo "

ERROR:   INVALID EMAIL ADDRESS

Please correct your TO: Address
and try again
   
"; } // Failure: Invalid FROM address --- This is the sender's email address if ($ERR == "ADDRfrom") { echo "

ERROR:   INVALID EMAIL ADDRESS

Please correct your FROM: address
and try again
   
"; } if ($ERR != "") {echo "


"; exit; } } ?> Digital Music Services ® - Email /common/DMS.css"> */ ?>