Quantcast
Channel: Adobe Community : All Content - Adobe Animate CC - General
Viewing all articles
Browse latest Browse all 13519

Problem With Submitting Data to Php Mail Script.

$
0
0

So i am working with this Flash template that my boss purchased. It has a contact form, you are supposed to be able to fill it out, and it sends an email to a specified email address.

However, it does not work. At all!

 

There are 4 Fields on the form

name

email

phone

message

 

 

The Code for the Submit Button is

 

-----Button Code-----

 

onClipEvent(load){this.t.v =  _root.contacts_txt7;}

on (rollOver) {this.gotoAndPlay("s1");}

on (rollOut) {this.gotoAndPlay("s2");}

on(release){

          _parent.loadVariables("inc/mail.php", "POST");

}

 

----Button Code-----

 

 

The php script is

 

---------------Php Script------------------

 

<?

$name=$_POST['name'];

$email=$_POST['email'];

$phone=$_POST['phone'];

$message=$_POST['message'];

 

 

$ToEmail = "email@here";

$ToSubject = "Message from your site";

 

$EmailBody =   "Name: $name\n

                                        Email: $email\n

                                        Phone: $phone\n

                                        Message: $message\n";

 

$Message = $EmailBody;

 

$headers .= "Content-type: text; charset=iso-8859-1\r\n";

$headers .= "From:".$name." / ".$email."\r\n";

 

mail($ToEmail,$ToSubject,$Message, $headers);

 

?>

 

------------Php Script------------

 

It seems like it should work. The mail function on the server works, as I am able to setup a basic php contact page, and it works, however, he wants this flash contact form. It's as if the flash is not sending anything to the php script. Is there something missing? I have stared at it for hours, and have resorted to banging my head on the wall in an effort to jar loose ideas, thus far, nothing. 


Viewing all articles
Browse latest Browse all 13519

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>