Solved

problems with recieving form info

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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

I hope you'll find this tutorial useful and interesting. So let's try to extend Tcl with a new package.  For anyone more deeply interested please check out the book "Practical Programming in Tcl and Tk". It's really one of the best written books abo…
Batch, VBS, and scripts in general are incredibly useful for repetitive tasks.  Some tasks can take a while to complete and it can be annoying to check back only to discover that your script finished 5 minutes ago.  Some scripts may complete nearly …
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

628 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