Solved

problems with recieving form info

Posted on 2009-05-13
4
168 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

Active Directory Webinar

We all know we need to protect and secure our privileges, but where to start? Join Experts Exchange and ManageEngine on Tuesday, April 11, 2017 10:00 AM PDT to learn how to track and secure privileged users in Active Directory.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this tutorial I will show you how to make a simple HTML bar chart with the usage of WhizBase, If you want more information about WhizBase please read my previous articles at http://www.experts-exchange.com/ARTH_5123186.html (http://www.experts-ex…
In threads here at EE, each comment has a unique Identifier (ID). It is easy to get the full path for an ID via the right-click context menu. However, we often want to post a short link within a thread rather than the full link. This article shows a…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
The goal of the tutorial is to teach the user how to set there setting in Adobe Flash Media Live Encoder and YouTube for optimal video and audio quality.

821 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