-
[CS3] Mail form
Hi! Im trying to make a flash form with email function. But somthing is from. Can anyone look at this code and give me some advice. The form shows properly on the web, buth seems to have problem with the send function.
the php looks like this
<?php
$theName= $_POST['theName'];
$theEmail= $_POST['theEmail'];
$theMessage= $_POST['theMessage'];
$to = "info@friendsofvcds.org";
$subject = "Medlemsregistrering";
$message = "Name: " . $theName;
$message .= "\nEmail " . $theEmail;
$message .="\n\nMessage: " . $theMessage
$headers = "From $theEmail";
$headers .="\nReply-To: $theEmail";
mail($to,$subject,$message,$headers);
?>
and the code in the flash action looks like this (its placed on the first frame)
stop();
var senderLoad:LoadVars = new LoadVars();
var receiveLoad:LoadVars = new LoadVars();
sender.onRelease = function() {
senderLoad.theName = theName.text;
senderLoad.theEmail = theEmail.text;
senderLoad.theMessage = theMessage.text;
senderLoad.theAdress = theAdress.text;
senderLoad.thePostnr = thePostnr.text;
senderLoad.theStad = theStad.text;
senderLoad.sendAndLoad("send.php",receiveLoad);
}
receiveLoad.onLoad = function() {
if(this.sentOk) {
_root.gotoAndStop("success");
}
else {
_root.gotoAndStop("failed");
}
}
-
i suggest using a form by itself, online generators are out there that let you customize the same stuff.
ex. subject, to, from, name
try this
http://www.tele-pro.co.uk/scripts/contact_form/
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|