Ok, I'm really getting confused with this.
I've been searching forums for days now trying to figure this out... and can't seem to get my contact form to work.
I'm fairly confident that my actionscript and flash file are okay... so maybe it's my php.
I think my php code is ok (see below)... but maybe it isn't? Or maybe it's something with GoDaddy... I'm using the Windows IIS 7 ... which supposedly supports PHP5... so I'm not sure what's up?
I've run across ideas of changing the extension of my php file to .php5 and also things about the gdform.php but I'm really confused!
Any help is much appreciated!
Please help.
Thanks in advance
Chris
<?php
// Gets the IP Address
ini_set('sendmail_from', 'user@domain.tld'); // Set only on Windows
ini_set('SMTP', 'relay-hosting.secureserver.net');
//Type the receiever's e-mail address
$emailAddress = "user@example.com";
//Type your Site Name
$siteName = "First Blush Photos";
$contact_name = $_POST['name'];
$contact_email = $_POST['email'];
$contact_subject = $_POST['subject'];
$contact_message = $_POST['message'];
if( $contact_name == true )
{
$sender = $contact_email;
$receiver = $emailAddress;
$client_ip = $_SERVER['REMOTE_ADDR'];
$email_body = "The Name Of The Sender: $contact_name \nEmail: $sender \n\nSubject: $contact_subject
\n\nMessage: \n\n$contact_message \n\nIP ADDRESS: $client_ip \n\n$siteName";
$emailAutoReply = "Hi $contact_name, \n\nWe have just received your E-Mail. We will get
in touch in a few days. Thank you! \n\n$siteName ";
$extra = "From: $sender\r\n" . "Reply-To: $sender \r\n" . "X-Mailer: PHP/" . phpversion();
$autoReply = "From: $receiver\r\n" . "Reply-To: $receiver \r\n" . "X-Mailer: PHP/" . phpversion();
mail( $sender, "Auto Reply: $contact_subject", $emailAutoReply, $autoReply );
if( mail( $receiver, "New E-Mail - $contact_subject", $email_body, $extra ) )
{
echo "success=yes";
}
else
{
echo "success=no";
}
}
?>