Solved

problems with recieving form info

Posted on 2009-05-13
4
161 Views
Last Modified: 2013-12-25
I can't get my form to deliver the information...and I don't know where I am going wrong.
in the first  frame in my movie, here's the action i loaded on it.

stop();

var gatherForm:LoadVars = new LoadVars();
function sendForm() {
      gatherForm.email_to = "ditch@iamditch.com";
      getherForm.visitor_message = Form.message.text;
      gatherForm.visitor_name = Form.Name.text;
      gatherForm.visitor_email = Form.Email.text;
      
      gatherForm.send("gdform.cgi", "POST");
}


on the submit button here's the action I loaded on it.

on (release) {
      gatherform.loadVars("gdform.cgi", "POST");
}
on (release) {
      nextFrame();
}

in a gdform.cgi file, here's the code i copied and uploaded.
 

<?

$sendTo = "my email address.com";

$subject = "webpage message";

$headers = "From: " . $_POST["firstName"] ." ". $_POST["lastname"] . "<" . $_POST["email"] .">\r\n";

$headers .= "Reply-To: " . $_POST["email"] . "\r\n";

$headers .= "Return-path: " . $_POST["email"];

$message = $_POST["message"];

mail($sendTo, $subject, $message, $headers);
 

?>

Open in new window

0
Comment
Question by:caditch
  • 2
  • 2
4 Comments
 
LVL 37

Expert Comment

by:CyanBlue
ID: 24386621
What do you exactly mean by 'I can't get my form to deliver the information'???  Do you at least get a blank email or partial information in it or you don't even get any email???

A couple of fixes I can see as is...

See this code block???
---
on (release) {
      gatherform.loadVars("gdform.cgi", "POST");
}
on (release) {
      nextFrame();
}
---

Replace it with this...
---
on (release) {
      sendForm();
}
---

And, fix your PHP script like this and see if it works...
-----
<?
$sendTo = "my email address.com";
$subject = "webpage message";
$headers = "From: " . $_POST["visitor_name"] . "<" . $_POST["visitor_email"] .">\r\n";
$headers .= "Reply-To: " . $_POST["visitor_email"] . "\r\n";
$headers .= "Return-path: " . $_POST["visitor_email"];
$message = $_POST["visitor_message"];
mail($sendTo, $subject, $message, $headers);
?>
-----

CyanBlue
0
 

Author Comment

by:caditch
ID: 24387260
Thank you for your help. I'm sorry I wasn't very clear on my problem. when i click send- I get nothing.
Not a blank email, nothing at all. go daddy doesn't help with script all they tell me is to save my uploaded file in my cgi directory. does that mean I should save the code as a .cgi file?
0
 
LVL 37

Accepted Solution

by:
CyanBlue earned 500 total points
ID: 24388120
See if this thread can help you...
     http://www.actionscript.org/forums/showthread.php3?t=190240

CyanBlue
0
 

Author Comment

by:caditch
ID: 24442599
Thank you for the link. I have tried and am so frustrated with this problem I am just going to remove the contact form from the .swf until I can understand it all better.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Here are some practices and techniques that can be adopted into your Flash/Flex application development process. Note: Not all "performance tips" provide an immediately-recognizable benefit.   This article does not include timing validation data,…
In this tutorial I will show you how to provide a dynamic RTF document on your website generated with data from your database. For this tutorial you will need Microsoft Word or WordPad, WhizBase and Microsoft Access. In this tutorial I will show …
The goal of the tutorial is to teach the user how to how to record live broadcast.
The goal of the tutorial is to teach the user how to select the video input device. Make sure you have an input device that in connected and work and recognized by Adobe Flash Media Live Encoder and select it in the “video input” menu.

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now