PDA

View Full Version : Contact Form Problems


sliilvia
09-27-2008, 11:00 AM
Hi all, I was wondering if any of you would be able to help me. I have downloaded a contact form template but after hours of googling have still not managed to make it work..
The best I have done is when I am testing the FLV I click on submit and in the output box I see:

Error opening URL 'file:///C|/Users/Ben/Desktop/Cognito%20%20Flash%20Site/Cognito%20Flash%20Site/Flash%20Source%20Files/Main%20Site%20Source/send_email.php?flashmo=142'

I have uploaded the FLA to http://rapidshare.com/files/148780069/MainSite2.zip as it was around 2 meg and too large to attach here, if anyone would mind taking a look at it as its becoming really frustrating. Basically when I test it on the server I can input the information but when I click the submit button it says 'sending' but then nothing happens after.

This is the PHP

<?php
$contact_name = $_POST['name'];
$contact_email = $_POST['email'];
$contact_subject = $_POST['subject'];
$contact_message = $_POST['message'];

if( $contact_name == true )
{
$sender = $contact_email;
$receiver = "my eamil@gmail.com";
$client_ip = $_SERVER['REMOTE_ADDR'];
$email_body = "Name: $contact_name \nEmail: $sender \nSubject: $contact_subject \nMessage: $contact_message \nIP: $client_ip \nFlash Contact Form provided by http://www.flashmo.com";
$extra = "From: $sender\r\n" . "Reply-To: $sender \r\n" . "X-Mailer: PHP/" . phpversion();

if( mail( $receiver, "Flash Contact Form - $subject", $email_body, $extra ) )
{
echo "success=yes";
}
else
{
echo "success=no";
}
}
?>


Many thanks to anyone that can help and I'd be happy to send a little something through paypal if anyone can solve my problems.

Regards

Sliilvia