Send Mail via php using Flash 8

  • Heart
  • Expert
  • Expert
  • User avatar
  • Posts: 633
  • Loc: Welcome To, Crazy World!

Post 3+ Months Ago

Hey guys! I have a problem for you guys. I have done a send mail via php using variables in flash but currently I am having some problems getting it to send for me on a different site that I am currently working on. It's not sending at all for me. I don't even get an blank email or anything else sent. I don't know if it's because I am using Flash 8 now or what the problem is. I am hoping it's a small error or something that I am over looking and maybe one of you can see what I can not.


Script for my send button:
Code: [ Select ]
on (release) {
    info.loadVariables("vmail.php", "POST");
    
    info.txt1 = "Name:";
    info.txt2 = "E-Mail:";
    info.txt3 = "Phone:";
    info.txt6 = "Message:";
    
    this.gotoAndStop(2);
}
  1. on (release) {
  2.     info.loadVariables("vmail.php", "POST");
  3.     
  4.     info.txt1 = "Name:";
  5.     info.txt2 = "E-Mail:";
  6.     info.txt3 = "Phone:";
  7.     info.txt6 = "Message:";
  8.     
  9.     this.gotoAndStop(2);
  10. }


My php script:
Code: [ Select ]
<?php
$sendTo = "mail@mail.com";
$subject = "SITE CONTACT";
$headers = "From: " . $_POST["txt1"];
$headers .= "Reply-To: " . $_POST["txt2"];
$headers .= "Return-path: " . $_POST["txt2"];
$message = $_POST["txt1"] . $_POST["txt2"] . $_POST["txt3"] . $_POST["txt6"];
mail($sendTo, $subject, $message, $headers);
?>
  1. <?php
  2. $sendTo = "mail@mail.com";
  3. $subject = "SITE CONTACT";
  4. $headers = "From: " . $_POST["txt1"];
  5. $headers .= "Reply-To: " . $_POST["txt2"];
  6. $headers .= "Return-path: " . $_POST["txt2"];
  7. $message = $_POST["txt1"] . $_POST["txt2"] . $_POST["txt3"] . $_POST["txt6"];
  8. mail($sendTo, $subject, $message, $headers);
  9. ?>


txt1 = name
txt2 = email
txt3 = phone
txt6 = message

You should know that "info" is a movieclip that I am storing my variables (txt1-6). And I am sure that I have all of them labeled for instance and var:.

here is a screen shot of it in case you are wondering why things are the way that they are:
Image

Any solutions or suggestions please let me know! Thank you for our help!
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23455
  • Loc: Woodbridge VA

Post 3+ Months Ago

Not certain why you need the "info". Also you aren't allowing for empty required fields which means you could get a lot of emails with missing or no information. Really you would want something in all those fields so I'd set it up something like this. (of course you'd have to supply an "error" message and a "sent" message using the appropriate labels to go to that part of the timeline. This is essentially how mine are set up.

For your action:

Code: [ Select ]
//note - I would replace your txt1, txt2,txt3 and txt6 labels with name, phone, email and message respectively

on (release) {
    if (name eq "" or phone eq "" or email eq "" or message eq "") {
        error.gotoAndPlay("error");
    } else {
        loadVariablesNum("vmail.php", 0, "POST");
        error.gotoAndPlay("sent");
        name = "";
        phone = "";
        email = "";
        message = "";
    }
}
  1. //note - I would replace your txt1, txt2,txt3 and txt6 labels with name, phone, email and message respectively
  2. on (release) {
  3.     if (name eq "" or phone eq "" or email eq "" or message eq "") {
  4.         error.gotoAndPlay("error");
  5.     } else {
  6.         loadVariablesNum("vmail.php", 0, "POST");
  7.         error.gotoAndPlay("sent");
  8.         name = "";
  9.         phone = "";
  10.         email = "";
  11.         message = "";
  12.     }
  13. }



then for vmail.php I would have the following (I assume mail@mail.com is bogus and you would have a real one there)

PHP Code: [ Select ]
<?
 
    if (isset($HTTP_POST_VARS)) {
 
           
 
            $name = $HTTP_POST_VARS["name"];
 
            $phone = $HTTP_POST_VARS["phone"];
 
            $email = $HTTP_POST_VARS["email"];
 
            $message = $HTTP_POST_VARS["message"];
 
            }
 
 
 
   $to = "mail@mail.com";
 
   $subject = "SITE CONTACT";
 
   $msg .= "Senders Name: " ."$name\n\n";
 
   $msg .= "Phone: " ."$phone\n\n";
 
   $msg .= "Email: " ."$email\n\n";
 
   $msg .= "Message: " ."$message\n\n";
 
    $msg .= "This message was sent to you from My Site Contact  Form.\n\n";
 
    $msg .= "Do not reply to this email directly.";
 
 
 
  mail($to, $subject, $msg, "From: My Site Contact Form\nReply-To: $email\n");
 
 
 
?>
  1. <?
  2.  
  3.     if (isset($HTTP_POST_VARS)) {
  4.  
  5.            
  6.  
  7.             $name = $HTTP_POST_VARS["name"];
  8.  
  9.             $phone = $HTTP_POST_VARS["phone"];
  10.  
  11.             $email = $HTTP_POST_VARS["email"];
  12.  
  13.             $message = $HTTP_POST_VARS["message"];
  14.  
  15.             }
  16.  
  17.  
  18.  
  19.    $to = "mail@mail.com";
  20.  
  21.    $subject = "SITE CONTACT";
  22.  
  23.    $msg .= "Senders Name: " ."$name\n\n";
  24.  
  25.    $msg .= "Phone: " ."$phone\n\n";
  26.  
  27.    $msg .= "Email: " ."$email\n\n";
  28.  
  29.    $msg .= "Message: " ."$message\n\n";
  30.  
  31.     $msg .= "This message was sent to you from My Site Contact  Form.\n\n";
  32.  
  33.     $msg .= "Do not reply to this email directly.";
  34.  
  35.  
  36.  
  37.   mail($to, $subject, $msg, "From: My Site Contact Form\nReply-To: $email\n");
  38.  
  39.  
  40.  
  41. ?>


Been using that for a couple years and works fine.

//lol - Took me awhile, but I just realized this is you! How ya been old friend?
  • JesterPrime
  • Born
  • Born
  • JesterPrime
  • Posts: 2

Post 3+ Months Ago

Hi I know this is a very old topic but im tryin to get this code to send an auto reply to the sender. Im pretty sure the code is the last bit of this line,

mail($to, $subject, $msg, "From: My Site Contact Form\nReply-To: $email\n");

Some how I got it to work once but nothing since. Please Help
  • petra825
  • Born
  • Born
  • petra825
  • Posts: 1

Post 3+ Months Ago

Hi,

Thank you so much, this is the first technique that has worked for me so far with Flash 8. I am having one issue, the email that get from the form comes out really weird, it looks like this:

Senders Name: <TEXTFORMAT LEADING=\"2\"><P ALIGN=\"LEFT\"><FONT FACE=\"Arial\" SIZE=\"13\" COLOR=\"#000000\" LETTERSPACING=\"0\" KERNING=\"0\">petra vincent</FONT></P></TEXTFORMAT>

subject: SITE CONTACT

Email: <TEXTFORMAT LEADING=\"2\"><P ALIGN=\"LEFT\"><FONT FACE=\"Arial\" SIZE=\"13\" COLOR=\"#000000\" LETTERSPACING=\"0\" KERNING=\"0\">info@petra825.com</FONT></P></TEXTFORMAT>

org: <TEXTFORMAT LEADING=\"2\"><P ALIGN=\"LEFT\"><FONT FACE=\"Arial\" SIZE=\"13\" COLOR=\"#000000\" LETTERSPACING=\"0\" KERNING=\"0\">my organization</FONT></P></TEXTFORMAT>

Comment: <TEXTFORMAT LEADING=\"2\"><P ALIGN=\"LEFT\"><FONT FACE=\"Arial\" SIZE=\"13\" COLOR=\"#000000\" LETTERSPACING=\"0\" KERNING=\"0\"></FONT></P></TEXTFORMAT><TEXTFORMAT LEADING=\"2\"><P ALIGN=\"LEFT\"><FONT FACE=\"Arial\" SIZE=\"13\" COLOR=\"#000000\" LETTERSPACING=\"0\" KERNING=\"0\">this is my comment this is my comment, please work please</FONT></P></TEXTFORMAT>

This message was sent to you from My Site Contact Form.

Do not reply to this email directly.

is there anyway to fix this. Thank you so much in advance.

Best,
Petra
  • JesterPrime
  • Born
  • Born
  • JesterPrime
  • Posts: 2

Post 3+ Months Ago

Hi petra825, since my post I've learnt a lot about how this form works. Not sure why its doing that but if you want to post your AS & php code I'll have a look. JesterP
  • tbenfield
  • Born
  • Born
  • tbenfield
  • Posts: 2

Post 3+ Months Ago

Hello guys, well I have got this email posting working from a flash site with the php using the code posted by ANTO/TW above but as with preta825 above I am getting some weird coding in the email content:
__________________________________________________________________

Senders Name: <TEXTFORMAT LEADING=\"2\"><P ALIGN=\"LEFT\"><FONT FACE=\"verdana\" SIZE=\"10\" COLOR=\"#626C77\" LETTERSPACING=\"0\" KERNING=\"0\">tony</FONT></P></TEXTFORMAT>

Surname: <TEXTFORMAT LEADING=\"2\"><P ALIGN=\"LEFT\"><FONT FACE=\"verdana\" SIZE=\"10\" COLOR=\"#626C77\" LETTERSPACING=\"0\" KERNING=\"0\"></FONT></P></TEXTFORMAT><TEXTFORMAT LEADING=\"2\"><P ALIGN=\"LEFT\"><FONT FACE=\"verdana\" SIZE=\"10\" COLOR=\"#626C77\" LETTERSPACING=\"0\" KERNING=\"0\">benfield</FONT></P></TEXTFORMAT>

Company: <TEXTFORMAT LEADING=\"2\"><P ALIGN=\"LEFT\"><FONT FACE=\"verdana\" SIZE=\"10\" COLOR=\"#626C77\" LETTERSPACING=\"0\" KERNING=\"0\"></FONT></P></TEXTFORMAT><TEXTFORMAT LEADING=\"2\"><P ALIGN=\"LEFT\"><FONT FACE=\"verdana\" SIZE=\"10\" COLOR=\"#626C77\" LETTERSPACING=\"0\" KERNING=\"0\">nostalgia bank</FONT></P></TEXTFORMAT>

Email: <TEXTFORMAT LEADING=\"2\"><P ALIGN=\"LEFT\"><FONT FACE=\"verdana\" SIZE=\"10\" COLOR=\"#626C77\" LETTERSPACING=\"0\" KERNING=\"0\">slaes@nostalgiabank</FONT></P></TEXTFORMAT>

Message: <TEXTFORMAT LEADING=\"2\"><P ALIGN=\"LEFT\"><FONT FACE=\"verdana\" SIZE=\"10\" COLOR=\"#626C77\" LETTERSPACING=\"0\" KERNING=\"0\">does this work?</FONT></P></TEXTFORMAT>

Subject:

SITE CONTACT This message was sent to you from My Site Contact Form. Do not reply to this email directly.

__________________________________________________________________

Any advice would really help guys.

Tony
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23455
  • Loc: Woodbridge VA

Post 3+ Months Ago

It looks like in your Flash Form you have Render Text as HTML enabled. Check each of your textInput fields and make sure that is disabled. It's the button that looks like <> just to the right of Single Line in the Properties Inspector.
  • tbenfield
  • Born
  • Born
  • tbenfield
  • Posts: 2

Post 3+ Months Ago

Thanks bud, that resolved the issue.
  • bozboz
  • Novice
  • Novice
  • bozboz
  • Posts: 31
  • Loc: Brighton

Post 3+ Months Ago

Yeah that one confused me for months as well

If your lazy you can use the striptags() function in php as well, do this on the message before its sent. Especially if you cant be bothered to go back and recompile the swf
  • codzprc
  • Born
  • Born
  • codzprc
  • Posts: 2

Post 3+ Months Ago

All of this has been incredibly helpful to me so far - but I have a twist I'd like to add. I'm using this code to send a password to me, as well as the ip address (well, just the password so far) The problem seems to be in my php code - since the Flash shouldn't have anything to do with the IP bit-- right? anyway. Nothing I try is working to relay the IP address through a message... Thank you in advance for help.

my flash code is (explanations below):


Code: [ Select ]
var myPassword:String = 'apples';
var jungle = password_txt.text
 
 
onEnterFrame = function  () {
jungle = password_txt.text
    }
 
submit_mc.onRelease = function (){
       
   loadVariablesNum("vmail.php", 0, "POST");
   jungle = "";
     
 
   if (password_txt.text == myPassword) {
     gotoAndStop("vidz");
   } else {
     gotoAndStop("invalid");
}
}
  1. var myPassword:String = 'apples';
  2. var jungle = password_txt.text
  3.  
  4.  
  5. onEnterFrame = function  () {
  6. jungle = password_txt.text
  7.     }
  8.  
  9. submit_mc.onRelease = function (){
  10.        
  11.    loadVariablesNum("vmail.php", 0, "POST");
  12.    jungle = "";
  13.      
  14.  
  15.    if (password_txt.text == myPassword) {
  16.      gotoAndStop("vidz");
  17.    } else {
  18.      gotoAndStop("invalid");
  19. }
  20. }



PHP code:


Code: [ Select ]
php<?
if (isset($HTTP_POST_VARS)) {
 
$name = $HTTP_POST_VARS["jungle"];
$ip  = $_SERVER['REMOTE_ADDR'];
}
 
$to = "Jim@bob.xom";
$subject = "SITE CONTACT";
$msg .= "Senders Name: " ."$name\n\n";
$msg .= "This message was sent to you from My Site Contact Form.\n\n";
$msg .= "Do not reply to this email directly.";
 
mail($to, $subject, $name, $msg, $ip );
 
?>/php
  1. php<?
  2. if (isset($HTTP_POST_VARS)) {
  3.  
  4. $name = $HTTP_POST_VARS["jungle"];
  5. $ip  = $_SERVER['REMOTE_ADDR'];
  6. }
  7.  
  8. $to = "Jim@bob.xom";
  9. $subject = "SITE CONTACT";
  10. $msg .= "Senders Name: " ."$name\n\n";
  11. $msg .= "This message was sent to you from My Site Contact Form.\n\n";
  12. $msg .= "Do not reply to this email directly.";
  13.  
  14. mail($to, $subject, $name, $msg, $ip );
  15.  
  16. ?>/php








flash explanation (for those that are wondering about the vars):::

Code: [ Select ]
 
    //set password
var myPassword:String = 'apples';
    //sets password to transfer to a dynamic text field for php reasons
var jungle = password_txt.text
 
   // live updates dynamic field so when they submit the code goes to php
onEnterFrame = function  () {
jungle = password_txt.text
    }
 
submit_mc.onRelease = function (){
       
   loadVariablesNum("vmail.php", 0, "POST");
   jungle = "";
     
 
   if (password_txt.text == myPassword) {
     gotoAndStop("vidz");
   } else {
     gotoAndStop("invalid");
}
}
  1.  
  2.     //set password
  3. var myPassword:String = 'apples';
  4.     //sets password to transfer to a dynamic text field for php reasons
  5. var jungle = password_txt.text
  6.  
  7.    // live updates dynamic field so when they submit the code goes to php
  8. onEnterFrame = function  () {
  9. jungle = password_txt.text
  10.     }
  11.  
  12. submit_mc.onRelease = function (){
  13.        
  14.    loadVariablesNum("vmail.php", 0, "POST");
  15.    jungle = "";
  16.      
  17.  
  18.    if (password_txt.text == myPassword) {
  19.      gotoAndStop("vidz");
  20.    } else {
  21.      gotoAndStop("invalid");
  22. }
  23. }
  • bozboz
  • Novice
  • Novice
  • bozboz
  • Posts: 31
  • Loc: Brighton

Post 3+ Months Ago

try

php<?
if (isset($HTTP_POST_VARS)) {

$name = $HTTP_POST_VARS["jungle"];
$ip = $_SERVER['REMOTE_ADDR'];
}

$to = "youremail@yoursite.com";
$subject = "SITE CONTACT";
$msg .= "Senders Name: " ."$name\n\n";
$msg .= "This message was sent to you from My Site ContactForm.\n\n IP address was $ip ";
$msg .= "Do not reply to this email directly.";

mail($to, $subject, $name, $msg);

?>/php
  • codzprc
  • Born
  • Born
  • codzprc
  • Posts: 2

Post 3+ Months Ago

Awesome! That worked perfectly, thanks. So basically it didn't print because it wasn't in quotes?? I'm not very php savvy, as you can tell.

thanks again
  • magic1000
  • Born
  • Born
  • magic1000
  • Posts: 3

Post 3+ Months Ago

Thank all!
  • contutti
  • Born
  • Born
  • contutti
  • Posts: 2

Post 3+ Months Ago

Hi to all. I seem to have the same problem, but I cannot solve it.
I have a form in flash.

The code on "Send" button is (simplified):

on (press) {
loadVariablesNum("mail.php", 0, "POST")
}


My PHP is:
<?php
$sendTo = "(my mail is here)";
$subject = "Message from My page";
$headers = "From: " . $_POST["name"];
$headers .= "<" . $_POST["email"] . ">\r\n";
$headers .= "Reply-To: " . $_POST["email"] . "\r\n";
$headers .= "Return-Path: " . $_POST["email"];
$message = $_POST["message"];
mail($sendTo, $subject, $message, $headers);
?>


And when I recieve the mail, it goes
<TEXTFORMAT LEADING=\"2\"><P ALIGN=\"LEFT\"><FONT FACE=\"Arial Narrow\" SIZE=\"14\" COLOR=\"#666666\" LETTERSPACING=\"0\" KERNING=\"0\">Testing message</FONT></P></TEXTFORMAT>
And the same in the "Respond to" field.

I tried:
- Enabling the <> button.
- Disabling the <> button.
- Set A/V to 0
- Changing fonts

Nothing worked... HALP!
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23455
  • Loc: Woodbridge VA

Post 3+ Months Ago

Make sure you've disable the <> button on all fields.

After you've made your changes and published your file, before you test it on your website, make sure you've cleared your brower's cache/temporary internet files. Most likely you are loading a cached version of the swf that didn't work right.
  • contutti
  • Born
  • Born
  • contutti
  • Posts: 2

Post 3+ Months Ago

ATNO/TW wrote:
Make sure you've disable the <> button on all fields.

After you've made your changes and published your file, before you test it on your website, make sure you've cleared your brower's cache/temporary internet files. Most likely you are loading a cached version of the swf that didn't work right.


Yep, already tried that. Still don't working.
With strip_tags in PHP code I managed to "trick" the flash and therefore achieve my objective.
  • lolo73
  • Born
  • Born
  • lolo73
  • Posts: 1

Post 3+ Months Ago

ok here is what i have
Code: [ Select ]
on (release) {
if (name eq "" or phone eq "" or email eq "" or message eq "") {
     error.gotoAndPlay("error");
} else {
     loadVariablesNum("vmail.php", 0, "POST");
     error.gotoAndPlay("sent");
     name = "";
     phone = "";
     email = "";
     message = "";
}
}
  1. on (release) {
  2. if (name eq "" or phone eq "" or email eq "" or message eq "") {
  3.      error.gotoAndPlay("error");
  4. } else {
  5.      loadVariablesNum("vmail.php", 0, "POST");
  6.      error.gotoAndPlay("sent");
  7.      name = "";
  8.      phone = "";
  9.      email = "";
  10.      message = "";
  11. }
  12. }


I want what that it moves on to a page and says "thanks your mail is sent" cheaks to see if the email is valid.
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23455
  • Loc: Woodbridge VA

Post 3+ Months Ago

if (name eq "" or phone eq "" or email eq "" or message eq "")

That line actually checks to make sure the required inputs are filled in. In this case the reuired inputs are name, phone, email and message. What it does not do is check that the email address is formatted validly. You could do that in your vmail.php script if you wanted.

In that example "error" and "sent" are frame labels in the movie. The error.gotoAndPlay("error"); takes them to the frame labeled "error" and there you would let them know that they didn't fill out all the required fields. The error.gotoAndPlay("sent"); takes them to the frame labeled "sent" where you would display "thanks your mail is sent"
  • gmoeller54
  • Newbie
  • Newbie
  • gmoeller54
  • Posts: 10

Post 3+ Months Ago

Greetings...
I have been using a flash--> php email form on my sites and the same server for years...
I really like the code that you came up with because of its requirement of completed fields (I have received numerous 'ghost' emails from my sites over the years)

Unfortunately, I can't get it to work...
Using flash 10 AS2

My variable buttons in flash are:
name
company
phone
email
message

here is my code on the submit button:

ACTIONSCRIPT Code: [ Select ]
on (release) {
     if (name eq "" or phone eq "" or email eq "" or message eq "") {
         error.gotoAndPlay("error");
     } else {
         loadVariablesNum("vmail.php", 0, "POST");
         error.gotoAndPlay("sent");
         name = "";
       company = "";
         phone = "";
         email = "";
         message = "";
     }
 }
  1. on (release) {
  2.      if (name eq "" or phone eq "" or email eq "" or message eq "") {
  3.          error.gotoAndPlay("error");
  4.      } else {
  5.          loadVariablesNum("vmail.php", 0, "POST");
  6.          error.gotoAndPlay("sent");
  7.          name = "";
  8.        company = "";
  9.          phone = "";
  10.          email = "";
  11.          message = "";
  12.      }
  13.  }



and the vmail.php:

PHP Code: [ Select ]
<?php
      if (isset($HTTP_POST_VARS)) {
   
          $name = $HTTP_POST_VARS["name"];
        $company = $HTTP_POST_VARS["company"];
          $phone = $HTTP_POST_VARS["phone"];
   
          $email =     $HTTP_POST_VARS["email"];
   
          $message = $HTTP_POST_VARS["message"];
 
              }
   
   
     $to = "samplemail<at>email<dot>com";
     $subject = "SILICONE BOOK SITE CONTACT";
     $msg .= "Senders Name: " ."$name\n\n";  
     $msg .= "Sender's Company: " ."$company\n\n";
     $msg .= "Phone: " ."$phone\n\n";
     $msg .= "Email: " ."$email\n\n";
   
     $msg .= "Message: " ."$message\n\n";
     $msg .= "This message was sent to you from My Site Contact  Form.\n\n";
   
     $msg .= "Do not reply to this email directly.";
   
   
     mail($to, $subject, $msg, "From: My Site Contact Form\nReply-To: $email\n");
   
   
   ?>
  1. <?php
  2.       if (isset($HTTP_POST_VARS)) {
  3.    
  4.           $name = $HTTP_POST_VARS["name"];
  5.         $company = $HTTP_POST_VARS["company"];
  6.           $phone = $HTTP_POST_VARS["phone"];
  7.    
  8.           $email =     $HTTP_POST_VARS["email"];
  9.    
  10.           $message = $HTTP_POST_VARS["message"];
  11.  
  12.               }
  13.    
  14.    
  15.      $to = "samplemail<at>email<dot>com";
  16.      $subject = "SILICONE BOOK SITE CONTACT";
  17.      $msg .= "Senders Name: " ."$name\n\n";  
  18.      $msg .= "Sender's Company: " ."$company\n\n";
  19.      $msg .= "Phone: " ."$phone\n\n";
  20.      $msg .= "Email: " ."$email\n\n";
  21.    
  22.      $msg .= "Message: " ."$message\n\n";
  23.      $msg .= "This message was sent to you from My Site Contact  Form.\n\n";
  24.    
  25.      $msg .= "Do not reply to this email directly.";
  26.    
  27.    
  28.      mail($to, $subject, $msg, "From: My Site Contact Form\nReply-To: $email\n");
  29.    
  30.    
  31.    ?>


It is not going to my labelled frames "error" or "sent" nor is it sending anything to my email...

pleez help!
thanx
Moderator Remark: corrected code display problem
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23455
  • Loc: Woodbridge VA

Post 3+ Months Ago

The code looks fine. I can't see anything that would cause it not to work. Can you provide any additional information?
  • graphixboy
  • Control + Z
  • Mastermind
  • User avatar
  • Posts: 1828
  • Loc: In the Great White North

Post 3+ Months Ago

There's a good chance its a scope issue. I assume the code is working correctly but flash can't find the content outside of the on(release). Basically Flash is looking for variables with those names INSIDE the button. Without being able to see the structure of your swf, I'm betting that you'll need something like
ACTIONSCRIPT Code: [ Select ]
var name = this._parent.name.text;
  • gmoeller54
  • Newbie
  • Newbie
  • gmoeller54
  • Posts: 10

Post 3+ Months Ago

Hi guys
And thank you for your responses.

I tried putting the variable calls in the actionscript as well.
Not helping.

I zipped up the .fla (CS4) and the vmail.php.
I am baffled.
Your help would be greatly appreciated!


soldesigns(dot)com/silicone/gmoeller_contact_form.zip
  • gmoeller54
  • Newbie
  • Newbie
  • gmoeller54
  • Posts: 10

Post 3+ Months Ago

can you guys access the .zip?
is this a good way to share the files?
thanx
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23455
  • Loc: Woodbridge VA

Post 3+ Months Ago

I was finally able to download it this morning, but I can't open the FLA. For some reason using CS3 it tells me it's an invalid file format. Perhaps because you are doing this on a mac?

Regardless I think it's possible that your problem is in your php file.

I don't know what it is about this post but you notice in your initial one I edited your post to correct the code. But for some reason when you copy the php code from here it wants to add a span tag.
Specifically:

Code: [ Select ]
$<span class="posthilit">email</span> = $HTTP_POST_VARS["<span class="posthilit">email</span>"];


Code: [ Select ]
$msg .= "<span class="posthilit">Email</span>: " ."$<span class="posthilit">email</span>\n\n";


Code: [ Select ]
$msg .= "Do not reply to this <span class="posthilit">email</span> directly.";


Code: [ Select ]
mail($to, $subject, $msg, "From: My Site Contact Form\nReply-To: $<span class="posthilit">email</span>\n");


Remove all the span tags from there. They aren't supposed to be there and could easily be preventing your email from working.

If that isn't it, perhaps somebody with a MAC can look at your FLA.
  • graphixboy
  • Control + Z
  • Mastermind
  • User avatar
  • Posts: 1828
  • Loc: In the Great White North

Post 3+ Months Ago

Mark its a CS4 file. Adobe changed it so they're not backward compatible. I'll try to grab it today and take a look.
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23455
  • Loc: Woodbridge VA

Post 3+ Months Ago

Thanks. I still think it's simply just the php though. The vmail.php included in the zip has the span tags. So if that's what is being used for the mail script it's wrong and it will fail.
  • gmoeller54
  • Newbie
  • Newbie
  • gmoeller54
  • Posts: 10

Post 3+ Months Ago

Hi guys...
Thanks for trying to dig into this!

I changed the .php into this:


<?php
if (isset($HTTP_POST_VARS)) {

$name = $HTTP_POST_VARS["name"];
$company = $HTTP_POST_VARS["company"];
$phone = $HTTP_POST_VARS["phone"];

$email = $HTTP_POST_VARS["email"];

$message = $HTTP_POST_VARS["message"];

}

$to = "email at gmail dot com";

$subject = "SILICONE BOOK SITE CONTACT";

$msg .= "Senders Name: " ."$name\n\n";

$msg .= "Sender's Company: " ."$company\n\n";

$msg .= "Phone: " ."$phone\n\n";

$msg .= "Email: " ."$email\n\n";

$msg .= "Message: " ."$message\n\n";

$msg .= "This message was sent to you from My Site Contact Form.\n\n";

$msg .= "Do not reply to this email directly.";

mail($to, $subject, $msg, "From: My Site Contact Form\nReply-To: $email\n");

?>

Basically took out the span tags
No luck

It is still not sending to my email, nor is it going to my labelled frames "error" or "sent"

My FLA is CS4-sorry :(
  • gmoeller54
  • Newbie
  • Newbie
  • gmoeller54
  • Posts: 10

Post 3+ Months Ago

any takers?
really would like to get this bad boy working!
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23455
  • Loc: Woodbridge VA

Post 3+ Months Ago

I don't have CS4 and it won't open in CS3. I can't offer any more ideas. Someone with CS4 will have to look.
  • graphixboy
  • Control + Z
  • Mastermind
  • User avatar
  • Posts: 1828
  • Loc: In the Great White North

Post 3+ Months Ago

I don't have time to look into this today. But here's a CS3 version of the file...

http://addsomespark.com/client/ozzu/gmoeller_contact_form.zip

Post Information

  • Total Posts in this topic: 59 posts
  • Users browsing this forum: No registered users and 7 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.