DJMgraphix
asked on
PHP submission form help
Hey EXPERTS!
Why doesn't this PHP work?
I'll post 2 different PHP submission forms on the code part... the TOP one is the new PHP that I took from my other website submission form and altered it for a new one.
The BOTTOM one is the working completely fine PHP form from my other website.
The problem with the TOP one is that when I hit submit, it doesn't show the email address as who it's from... also for some emails like on a godaddy.com server email... they don't even get it... if I submit from my other website to a godaddy.com server email it works just fine.
THANKS!
DJM
Why doesn't this PHP work?
I'll post 2 different PHP submission forms on the code part... the TOP one is the new PHP that I took from my other website submission form and altered it for a new one.
The BOTTOM one is the working completely fine PHP form from my other website.
The problem with the TOP one is that when I hit submit, it doesn't show the email address as who it's from... also for some emails like on a godaddy.com server email... they don't even get it... if I submit from my other website to a godaddy.com server email it works just fine.
THANKS!
DJM
<?php
/* Subject and Email Variables */
$emailSubject = 'The Art Bucket WEBSITE CONTACT!';
$webMaster = 'djm@djmgraphix.com';
/* Gathering Data Variables */
$ClientName= $_POST['ClientName'];
$Email = $_POST['Email'];
$Phone = $_POST['Phone'];
$Referrals = $_POST['Referrals'];
$ReferralsOther = $_POST['ReferralsOther'];
$Promotions = $_POST['Promotions'];
$Interests = $_POST['Interests'];
$body = <<<EOD
<br><hr><br>
Name: $ClientName <br>
Email: $emailaddress <br>
Phone Number: $Phone <br>
Referrals: $Referrals <br>
Referrals Other: $ReferralsOther <br>
Promotions: $Promotions <br>
Interests: $Interests <br>
EOD;
$headers = "From: $emailaddress\r\n";
$headers .= "Content-type: text/html\r\n";
$success = mail($webMaster, $emailSubject, $body, $headers);
/* Results rendered as HTML */
$theResults = <<<EOD
_______________________________BOTTOM PHP_______________________________
<?php
/* Subject and Email Variables */
$emailSubject = 'DJM Graphix Contact!';
$webMaster = 'amanda@theartbucket.com';
/* Gathering Data Variables */
$ClientName= $_POST['ClientName'];
$emailaddress = $_POST['emailaddress'];
$Phone = $_POST['Phone'];
$Questions = $_POST['Questions'];
$Deadline = $_POST['Deadline'];
$body = <<<EOD
<br><hr><br>
Name: $ClientName <br>
Email: $emailaddress <br>
Phone Number: $Phone <br>
Question: $Questions <br>
Deadline: $Deadline <br>
EOD;
$headers = "From: $emailaddress\r\n";
$headers .= "Content-type: text/html\r\n";
$success = mail($webMaster, $emailSubject, $body, $headers);
/* Results rendered as HTML */
$theResults = <<<EOD
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Yes Sir!
That did it!... Thank you very much! (contact page CHECK) :)
http://www.djmgraphix.com/THE_ART_BUCKET/contact_us.html
That did it!... Thank you very much! (contact page CHECK) :)
http://www.djmgraphix.com/THE_ART_BUCKET/contact_us.html
ASKER
YES and YES!
For example the different between the bottom and top is that the top script is $_POST['email'] while the bottom is $_POST['emailaddress'], and that is a common mistake that even I make.