# Email Form script for Flash

**URL:** <https://forum.kirupa.com/t/email-form-script-for-flash/26608>\
**Category:** programming\
**Created:** [July 24, 2003, 5:39pm UTC](https://forum.kirupa.com/t/email-form-script-for-flash/26608 "2003-07-24T17:39:47Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bez](https://avatars.discourse-cdn.com/v4/letter/b/919ad9/32.png) [@Bez](https://forum.kirupa.com/u/Bez)\
**Post date:** [July 24, 2003, 5:39pm UTC](https://forum.kirupa.com/t/email-form-script-for-flash/26608/1 "2003-07-24T17:39:47Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 24, 2003, 5:59pm UTC](https://forum.kirupa.com/t/email-form-script-for-flash/26608/2 "2003-07-24T17:59:44Z")

</div>

```php

<?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](http://www.yourserver.com/mail.php)”);  
}  
[/AS]

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 24, 2003, 6:23pm UTC](https://forum.kirupa.com/t/email-form-script-for-flash/26608/3 "2003-07-24T18:23:04Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 24, 2003, 6:32pm UTC](https://forum.kirupa.com/t/email-form-script-for-flash/26608/4 "2003-07-24T18:32:12Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 24, 2003, 6:41pm UTC](https://forum.kirupa.com/t/email-form-script-for-flash/26608/5 "2003-07-24T18:41:07Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 24, 2003, 6:43pm UTC](https://forum.kirupa.com/t/email-form-script-for-flash/26608/6 "2003-07-24T18:43:00Z")

</div>

Thanks Nj,

Much appreciated

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 24, 2003, 7:20pm UTC](https://forum.kirupa.com/t/email-form-script-for-flash/26608/7 "2003-07-24T19:20:50Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 24, 2003, 7:21pm UTC](https://forum.kirupa.com/t/email-form-script-for-flash/26608/8 "2003-07-24T19:21:58Z")

</div>

forgot to attach…

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 24, 2003, 7:22pm UTC](https://forum.kirupa.com/t/email-form-script-for-flash/26608/9 "2003-07-24T19:22:47Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 24, 2003, 7:24pm UTC](https://forum.kirupa.com/t/email-form-script-for-flash/26608/10 "2003-07-24T19:24:37Z")

</div>

I have msn

MSN: njs12345 -at- [hotmail.com](http://hotmail.com)

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 24, 2003, 7:29pm UTC](https://forum.kirupa.com/t/email-form-script-for-flash/26608/11 "2003-07-24T19:29:05Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 25, 2003, 3:32pm UTC](https://forum.kirupa.com/t/email-form-script-for-flash/26608/12 "2003-07-25T15:32:35Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 25, 2003, 4:41pm UTC](https://forum.kirupa.com/t/email-form-script-for-flash/26608/13 "2003-07-25T16:41:05Z")

</div>

doesnt that stink

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 25, 2003, 4:43pm UTC](https://forum.kirupa.com/t/email-form-script-for-flash/26608/14 "2003-07-25T16:43:50Z")

</div>

Yep, It sure does ☹

My other host does though, So its ok 🙂

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 25, 2003, 9:32pm UTC](https://forum.kirupa.com/t/email-form-script-for-flash/26608/15 "2003-07-25T21:32:29Z")

</div>

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)

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 25, 2003, 9:52pm UTC](https://forum.kirupa.com/t/email-form-script-for-flash/26608/16 "2003-07-25T21:52:08Z")

</div>

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
