Email Form script for Flash

Hi Guys,

I have created an email from following a tutorial, But the tutrial in the end turned out to use CGI.

So, Not i have the form set up, With the variables set, Is there a way of making it a php email form?

If yes, Can anybody provide me with a php script which i can use to interact with the form to send the email?

Regards


<?php
$to="me@me.com";
$subject="Contact Form.";
$message=$_POST['message'];
mail($to,$subject,$message);
?>

The above script sends an email to the adress in $to, with the body $message, and the subject $subject.

An example flash AS script that would work with the above PHP:
[AS]
myButton_btn.onRelease = function(){
mail_lv.message=myText_txt.text;
mail_lv.send(“www.yourserver.com/mail.php”);
}
[/AS]

I cant seem to get this to work,

If i upload my php file and my fla will you take a look at it for me?

http://www.kirupaforum.com/forums/showthread.php?threadid=17604&highlight=variables+php+email

Yeah, you can do that, and I’ll check it for you. :slight_smile:

Thanks Nj,

Much appreciated

It should be working now.

Unfortunately, I can’t test it because I haven’t got a working mail server at the moment, but try it wherever you can.

You’ll have to change your email again in the form.php script.

The main reason it wasn’t working was that you had forgotten to change some stuff.

forgot to attach…

Hi Nj,

You gonna upload the files?

And, For my own knowledge, What hadn’t i changed that needed to be changed?

P.s
Do you have Aol or Msn?

I have msn

MSN: njs12345 -at- hotmail.com

Hi Nj,

I have uploaded the files you provided me with, And they still do not work.

Do i need to chmod the php file?

Also, When i pressed the submit button, A new browser opens which contains the form.php file.

In case anyone was interested in this, the files that I gave to Bez did work. His host wasn’t set up to send email.

doesnt that stink

Yep, It sure does :frowning:

My other host does though, So its ok :slight_smile:

if often worries me that web hosting company’s don’t have their server configured to send email, i mean isn’t that a a neccessity?( i know i spelled that wrong :0)

Yeah, I know what you mean.

You pay for something, So you expect what you are paying for.

Im going to contact them and ask them if they will set it up