Hello all,
I will try and make this brief… been dealing with it for quite some time. Basically, I have a Flash movie that includes a text field and a submit button. The user will put in their e-mail address and then click submit… which will send them an e-mail.
Everything works fine on bluehost.com. However, my client needs it to work on godaddy.com. I have found one interesting thing that might help some of you with this!
Here is the line of code that is attached to my button in flash…
on (release) {
form.loadVariables("Pricing_Texts/My_Heaven_Hell_PRICING.php", "POST");
}
Here is the PHP file that it is calling…
<?php
include_once("Mail.php");
$to = $HTTP_POST_VARS['email'];
$subject = "Requested Pricing";
$headers = 'MIME-Version: 1.0' . "
";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "
";
$headers .= 'From: Todd White <pricing@artofwhitegallery.com>' . "
";
$headers .= 'Cc: ' . "
";
$message = "Thank you for your interest! Here is the pricing you requested:
My Heavan & Hell - $1500.00
Please feel free to contact us at 317-379-6340 with any questions!";
if (!preg_match("/\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*/", $to)) {
echo "<h4>Invalid email address</h4>";
echo "<a href='javascript:history.back(1);'>Back</a>";
} elseif ($subject == "") {
echo "<h4>No subject</h4>";
echo "<a href='javascript:history.back(1);'>Back</a>";
}
elseif (mail($to,$subject,$message,$headers)) {
echo "<h4>Thank you for sending email</h4>";
} else {
echo "<h4>Can't send email to $to</h4>";
}
?>
Now, the most interesting thing is this…
When I replace
$to = $HTTP_POST_VARS['email'];
with
$to = "asmithdesigns@gmail.com";
the works great with godaddy.com. However, when I try and do it the original way… it always shoots back Invalid E-Mail Address.
Like I said before, I know that my original coding works 100% since I have it running on bluehost. It is just that my client needs it working through godaddy.
I have already made sure that I am using Linux hosting on both goddady and bluehost. They are both capable of running the most current versions of php as well.
Does anyone have any ideas?? I am desperate!!
Thanks for your time and concern,
.: andrew