Topic: Flash mail form (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=30998" title="Pages that link to Topic: Flash mail form (Page 1 of 1)" rel="nofollow" >Topic: Flash mail form <span class="small">(Page 1 of 1)</span>\

 
nobodywebsite
Nervous Wreck (II) Inmate

From: This planet
Insane since: May 2002

posted posted 05-11-2009 00:47

I have difficulty to make a script for a flash mailer form php using flash 6 (mx 2001) action script 1.

I then checked 2 templates and both where unsucessful ( test movie still on flash 6 mx 2001)

Anybody with same ISSUE? What you suggest instead.

one of the example - placed on keyframe/loadVariables:


Fla:
var senderLoad:LoadVars = new LoadVars();
var receiveLoad:LoadVars = new LoadVars();

sender.onRelease = function() {
senderLoad.name = name.text
senderLoad.email = email.text
senderLoad.message = message.text
senderLoad.sendAndLoad("http://www.mySite/email.php",receiveLoad);
}
receiveLoad.onLoad = function() {
if(this.sentOk) {
_root.gotoAndStop (6);
}
else {
_root.gotoAndStop (7);
}
}


//however, movie istances and names are set properly.

PHP:

<?php



$sendTo = "me@mysite";
$subject = " flash mail";

// variables are sent to this PHP page through
// the POST method. $_POST is a global associative array
// of variables passed through this method. From that, we
// can get the values sent to this page from Flash and
// assign them to appropriate variables which can be used
// in the PHP mail() function.



$headers = "From: " . $_POST["name"];
$headers .= "<" . $_POST["email"] . ">\r\n";
$headers .= "Reply-To: " . $_POST["email"] . "\r\n";
$headers .= "Return-Path: " . $_POST["email"];
$message = $_POST["message"];


?>


To make it short, Any templates that work cross platform out there?
Thanks!


(Edited by nobodywebsite on 05-11-2009 01:00)

Blacknight
Paranoid (IV) Inmate

From: INFRONT OF MY PC
Insane since: Dec 2001

posted posted 05-11-2009 08:13

Are the $_POST variables sent to the php script correctly?.
And your PHP script is missing the php->mail() function, so there is nothing sent.

nobodywebsite
Nervous Wreck (II) Inmate

From: This planet
Insane since: May 2002

posted posted 05-11-2009 09:23

Thanks Blacknight,

variable names of form field in flash are properly set and matching those on the php script


how would you exacly add the php->mail() function to the script?

...I used popular templates to resolve issues , but no success.

(Edited by nobodywebsite on 05-11-2009 09:36)

Blacknight
Paranoid (IV) Inmate

From: INFRONT OF MY PC
Insane since: Dec 2001

posted posted 05-11-2009 18:29

I'll have to ask one of our php guys here to answer this.

DavidJCobb
Nervous Wreck (II) Inmate

From: United States
Insane since: Mar 2009

posted posted 05-11-2009 20:49
code:
mail($sendTo,$subject,$message,$headers)


I think that's it.

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

nobodywebsite
Nervous Wreck (II) Inmate

From: This planet
Insane since: May 2002

posted posted 05-12-2009 09:20

David you where right is missing

many thanks but was included at the end of the script between comments.

I guess will need to adjust the script to send (from flash) to an internal email then the scrip will receive from that email to re-send to the final address. as I do with standard html forms:


// often email servers won't allow emails to be sent to
// domains other than their own. The return path here will
// often lift that restriction so, for instance, you could send
// email to a hotmail account.


Anyway will figure out later when I got time. any script or template will be helpuful.

Thanks for reading!



(Edited by nobodywebsite on 05-12-2009 09:22)

(Edited by nobodywebsite on 05-12-2009 09:42)

nobodywebsite
Nervous Wreck (II) Inmate

From: This planet
Insane since: May 2002

posted posted 05-12-2009 22:04

Tried this "template" flash - PHP - mailbox with the following, also in same directory.. no success.

with email mediation script I use is no problems, will need adjustments for flash

I guess will try later

anybody has a simple working flash form (a. script 1)?


Fla:
var senderLoad:LoadVars = new LoadVars();
var receiveLoad:LoadVars = new LoadVars();

sender.onRelease = function() {
senderLoad.name = name.text
senderLoad.email = email.text
senderLoad.message = message.text
senderLoad.sendAndLoad("http://www.mySite/email.php",receiveLoad);
}
receiveLoad.onLoad = function() {
if(this.sentOk) {
_root.gotoAndStop (6);
}
else {
_root.gotoAndStop (7);
}
}

PHP

<?php
$to = "me@mysite";
$subject = "Flash message";
$message = "Name: " . $name;
$message .= "\nEmail: " . $email;
$message .= "\n\nMessage: " . $message;
$header = "From: $email";
$header .= "\nReply-to: $email";

$sentok = mail($to,$subject,$mmessage,$headers);

echo "sentOk=" . $sentok;


?>



Post Reply
 
Your User Name:
Your Password:
Login Options:
 
Your Text:
Loading...
Options:


« BackwardsOnwards »

Show Forum Drop Down Menu