PHP scripting for form information to come to email

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
MaryAlice
Forum Newbie
Posts: 1
Joined: Wed Oct 24, 2007 12:44 am

PHP scripting for form information to come to email

Post by MaryAlice »

***** PLEASE USE TAGS FOR POSTING CODE *****

See my php script below. I have put it on a website that I have designed for a company. For now, I have put my own email address for the form information to come to. However, the form information does not come to my email???? Wondering where the error is in PHP?
I have the files in a jpg showing how they look in Flash and in the php file. If you want, you may email me. My email is art.design@comcast.net. I need the form information coming to my email. Please tell me why the form information is not coming to my email.?

Regarding the ActionScript 1.0/2.0, this is what I put for the FORM:

Code: Select all

onClipEvent (data) {
_root.nextFrame();
}
-------------------------------------------------------------------------------
This is what I put for the SUBMIT button:

Code: Select all

onClipEvent (load) {
form.loadVariables("analysisformphp.php", "POST");
}
-------------------------------------------------------------------------------

And regarding the PHP, I made a separate file for the PHP scripting. It is as follows:

Code: Select all

<?php
$SendTo = "art.design@comcast.net"
$subject = "My AnalysisForm Reply";

$headers = "From: " . $_POST["household"]; 
$headers = "From: " . $_POST["water supply"];
$headers = "From: " . $_POST["softener"]; 
$headers = "From: " . $_POST["bottled water"];
$headers = "From: " . $_POST["comments"];
$headers = "From: " . $_POST["name/business"];
$headers = "From: " . $_POST["address"]; 
$headers = "From: " . $_POST["city/state/zip"]; 
$headers = "From: " . $_POST["phone"]; 
$headers .= "<" . $_POST["email"] . ">\r\n"; 
$headers .= "Reply-To: " . $_POST["email"] . "\r\n"; 
$headers .= "Return-Path: " . $_POST["email"]; 

mail(recipient, subject, message, other headers);
mail($sendTo, $subject, $message, $headers); 
?>
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Post by Christopher »

The manual for mail() is pretty good and has some examples you can use;

http://www.php.net/manual/en/function.mail.php

Looking at the code, you are probably getting errors. Add this at the top of the PHP script until you have it working:

Code: Select all

error_reporting(E_ALL);
(#10850)
Post Reply