Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

problems with recieving form info

Posted on 2009-05-13
4
Medium Priority
?
189 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 2000 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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

I have been doing hardcore actionscripting for some time; and needless to say I have faced a lot of problems in just understanding others' code rather than understanding what the code executes. A programmer's life can become hell when there are a lo…
Active Directory replication delay is the cause to many problems.  Here is a super easy script to force Active Directory replication to all sites with by using an elevated PowerShell command prompt, and a tool to verify your changes.
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 what frame rate is, how to control it and what effect it has on the video.
Suggested Courses

824 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