Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

problems with recieving form info

Posted on 2009-05-13
4
Medium Priority
?
181 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

What is a Denial of Service (DoS)?

A DoS is a malicious attempt to prevent the normal operation of a computer system. You may frequently see the terms 'DDoS' (Distributed Denial of Service) and 'DoS' used interchangeably, but there are some subtle differences.

Question has a verified solution.

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

This article will show, step by step, how to integrate R code into a R Sweave document
A quick Powershell script I wrote to find old program installations and check versions of a specific file across the network.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The goal of the tutorial is to teach the user how to how to record live broadcast.

715 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