Groups | Blog | Home
all groups > flash actionscript > june 2005 >

flash actionscript : Need Help with Flash-Based Email Form Using PHP



mmay321
6/1/2005 9:27:38 PM
i read a tutorial on creating a Flash-Based Email Form Using PHP, and can't
seem to get it to work. i created the flash file and php files following the
instructions and uploaded the files to the server, and tested it by trying to
send an email to myself - didn't work, so then i tried using the tutorial's
example files (changed only the email address to my own in the php file) and
that didn't work either. i've never used php before, so am i missing something
else i have to do to the php file. could it also be a problem with a server? i
tried it on another website server as well, and it also didn't work there. i'm
so confused - please help! i would also be totally open to creating the email
form using something other than php if anyone has any ideas.



php code below:



<?php
$sendTo = "mmay321@yahoo.com";
$subject = "New Mailing List Subcriber";
$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);
?>

David Powers
6/1/2005 10:42:25 PM
[quoted text, click to view]

There's nothing obviously wrong with the PHP script you are using.
First, obvious question - does your server support PHP?

If it does, you might like to try the tutorial in the sample chapter for
my book. You can get hold of it by visiting
http://computerbookshelf.com/php5flash/ and following the link for the
download chapter. There are also sample files on my publisher's website.

--
David Powers
Author, "Foundation PHP 5 for Flash" (friends of ED)
Co-author "PHP Web Development with DW MX 2004" (Apress)
AddThis Social Bookmark Button