PDA

View Full Version : php email script with flash?



G
January 27th, 2004, 03:08 PM
help with this...
hey guys having realy problems with the email tutorial, wel applying it. Could someone check out my file and see what I've done wrong please?

All the actions are contained in the last frame on the main timeline.



Thanks guys

G
January 27th, 2004, 03:39 PM
someone please I'm pulling be hair out here!

Jubba
January 27th, 2004, 03:42 PM
post your code. I can't view the file. What is the Flash code you are using? and what is the PHP code you are using?

edit: Oh and you have to be patient. We all have lives and we all live in different time zones so we aren't all on the forums at the same time and certain people that are on the forum may not know the answer. You can't start begging for help after 30 minutes... have some patience...

G
January 27th, 2004, 03:52 PM
<?php
/************************************************** *\
* PHP 4.1.0+ version of email script. For more
* information on the mail() function for PHP, see
* http://www.php.net/manual/en/function.mail.php
\************************************************* **/


// First, set up some variables to serve you in
// getting an email. This includes the email this is
// sent to (yours) and what the subject of this email
// should be. It's a good idea to choose your own
// subject instead of allowing the user to. This will
// help prevent spam filters from snatching this email
// out from under your nose when something unusual is put.

$sendTo = "g_barnettuk@hotmail.com";
$subject = "Streamzdesign.com reply";

// 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.


// header information not including sendTo and Subject
// these all go in one variable. First, include From:
$headers = "From: " . $_POST["name"];
$headers .= "<" . $_POST["email"] .">\r\n";
// next include a Reply-To:
$headers .= "Reply-To: " . $_POST["email"];

// now we can add the content of the message to a body variable
$message = $_POST["message"];


// once the variables have been defined, they can be included
// in the mail function call which will send you an email
mail($sendTo, $subject, $message, $headers);
?>

G
January 27th, 2004, 03:54 PM
Sorry forgot first half of message

OK here it goes – I have a mc with an instance of ‘formset’ in which is another movieclip ‘form’, also in the ‘formset mc is a submit button with an instance of ‘submit’. I followed the tutorial and put the actions on the form mc which are in my case –

onClipEvent(data){
this._parent.nextFrame();
}

Now all my buttons actions are kept on a key frame in the main timeline. The actions that I’m using for my submit button are (includes rollover actions) –

formset.submit.submitbutton.onRollOver = function(){
_root.formset.submit.gotoAndPlay("rollover");
}
formset.submit.submitbutton.onRollOut = function(){
_root.formset.submit.gotoAndPlay("rollout");
}
formset.submit.submitbutton.onRelease = function(){
this.formset.form.loadVariables("email.php", "POST");
}

The back button contains the following actions as well –

formset.back.backbutton.onRollOver = function(){
_root.formset.back.gotoAndPlay("rollover");
}
formset.back.backbutton.onRollOut = function(){
_root.formset.back.gotoAndPlay("rollout");
}
formset.back.backbutton.onRelease = function(){
this.formset.prevFrame();
}

The php code is the same as the tutorials. I know I’m doing something simple wrong but I don’t know what. The code is this though –

sintax321
January 27th, 2004, 04:33 PM
I can't really figure much out from the code you posted and the FLA you sent would not open for me for some reason. Post your FLA in this thread and maybe some one else can view it. Sorry but i'm not much help when it comes to server side stuff, my AS skills are moderate at best.

G
January 27th, 2004, 04:35 PM
cheers sintax. its an mx2004 file. if anyone else can help i would appreciate it.

sintax321
January 27th, 2004, 04:56 PM
ya i'm sticking with MX so far. Good luck