PDA

View Full Version : Problem with getting Email PHP to WORK...


trighap
08-10-2008, 06:24 AM
Hello again. Thanks to Atomic's helpful and fast assistance, I have eliminated one of my two biggest problems with my site. I am hoping that the other problem can now be solved.

I have a contact page on my website, and I want the email to go to my email account. I found what I felt to be a clear guide to making an email.php setup ( http://www.kirupa.com/developer/actionscript/flash_php_email.htm ) and followed it to the letter... And yet it does not work.

On my send button, I have the following AS:

form.loadVariables("email.php", "POST");
onClipEvent(data){
_root.nextFrame();

and I have the contact page set as a movieclip with the instance name of "form". Then I have the email.php file with the following:

<?php
$sendTo = "classified@somewhere.com";
$subject = "My Flash site reply";
$headers = "From: " . $_POST["name"];
$headers .= "<" . $_POST["email"] . ">\r\n";
$headers .= "Reply-To: " . $_POST["email"] . "\r\n";
$headers .= "Return-Path: " . $_POST["email"];
$message = $_POST["message"];
mail($sendTo, $subject, $message, $headers);
?>

with the three input text field properly instance named "name", "email", and "message".

Yet what happens is when you go to the contact page, the "name" field has _level0.form.name and the "email" field has _level0.form.email written in their field... And the send button doesn't work.

The websites' address is http://www.dimensionalpublishing.com/index in case anyone wants to visually see the problem. Thanks in advance to any and all assistance.

Trighap

atomic
08-10-2008, 07:08 AM
Grrrrrrreat! ;)

As for your e-mail problem, this example .fla & PHP script, from our own CyanBlue (best moderator on the board!) has always worked fine for me and to the other users I have suggested it to...

You might want to have a look...

http://tutorials.flashvacuum.com/index.php?show=Email101

This is all assuming you have PHP available & enabled on your server, otherwise, you'll never get any e-mails...
Make sure of that, as a first step.

Nikmaster0
08-11-2008, 04:32 PM
shouldn't it be
form.loadVariables("email.php", "POST");
onClipEvent(data){
_root.nextFrame();
}