Skip to main content
September 27, 2008
Question

Flash form not sending back data

  • September 27, 2008
  • 16 replies
  • 888 views
Hi all I am having problems with a Flash site I am working on where the send button works the contact.php form but when the email comes in it has no content in the fields??

button code
on (release) {
_parent.getURL("contact.php","_blank","GET");
_parent.name="Your Name :";
_parent.email="Your Email :";
_parent.message="Your Message :";
}

php code
<?php
$your_name = $_GET['name'];
$your_email = $_GET['email'];
$your_message = $_GET['message'];

$recipient_email = "derek@house-builder.net";

$subject = "from " .$your_email;
$headers = "From:" .$your_name . "<" . $your_email . ">\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1';

$content = "<html><head><title>Contact Letter</title></head><body><br>";
$content .="Name: <b>" . $your_name . "</b><br>";
$content .="Email: <b>" . $your_email . "</b><br><hr><br>";
$content .= $your_message;
$content .= "<br></body></html>";

mail($recipient_email,$subject,$content,$headers);

?>
<html>
<body bgcolor="#996600">
<div align="center" style="margin-top::60px;color:#FFFFFF;font-size:12px;font-family:"Times New Roman", Times, serif;font-weight:bold">
your message was sent. thank you.
</div>
</body>
</html>
<script>resizeTo(300, 300)</script>

email outcome
Name: Your Name :
Email: Your Email :

--------------------------------------------------------------------------------

Your Message :

So you see it is sending the php but not attaching the content
the site is www.kitchen-fitted.co.uk
thank you in advance
best wishes Derek
This topic has been closed for replies.

16 replies

October 15, 2008
Hi Thank you for your time!
I have edited your code and as follows
CODE
sendLV=new LoadVars();
receiveLV=new LoadVars()
receiveLV.onData=function(src){
trace(src);
}

send_btn.onRelease=function(){
sendLV.email=email; // actually now i see you aren't assigning anything meaningful in your code
sendLV.name=name;
sendLV.message=message

sendLV.sendAndLoad("contact.php",receiveLV,"GET");
}
I assumed to change the ? with my instances was that correct?
I deleted the other code and pasted yours on the same time line as the button. Only now i fill in the form and click button and it just hangs there not a thing? any idea?
thank you Derek
kglad
Community Expert
Community Expert
September 28, 2008
don't attach the code to an object. attach it to a frame.
September 28, 2008
I am geting a request for onClipEvent handler?? as follows:
code
Statement must appear within on/onClipEvent handler
im am using as 2
kglad
Community Expert
Community Expert
September 27, 2008
it's always best to avoid attaching code directly to objects. so, create your lv instance on the timeline that contains your button and code for you button on that timeline:

sendLV=new LoadVars();
receiveLV=new LoadVars()
receiveLV.onData=function(src){
trace(src);
}

yourbutton.onRelease=function(){
sendLV.email=?; // actually now i see you aren't assigning anything meaningful in your code
sendLV.name=?;
sendLV.message=?

sendLV.sendAndLoad("contact.php",receiveLV,"GET");
}
September 27, 2008
Hi kglad,
thak you for getting back to me!
where shal i put the loadvars class on the main timeline or with in the button code? and how would you type it in this instance?
best wishes Derek
kglad
Community Expert
Community Expert
September 27, 2008
use the loadvars class to send data to your php script.