# PHP Flash Form-Mail Tutorial

**URL:** <https://forum.kirupa.com/t/php-flash-form-mail-tutorial/15694>\
**Category:** flash\
**Created:** [March 17, 2003, 6:38am UTC](https://forum.kirupa.com/t/php-flash-form-mail-tutorial/15694 "2003-03-17T06:38:38Z")\
**Posts on this page:** 14\
**Page:** 4

<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:** [June 23, 2003, 12:31pm UTC](https://forum.kirupa.com/t/php-flash-form-mail-tutorial/15694/61 "2003-06-23T12:31:28Z")

</div>

> \*Originally posted by Seretha Blaze \*  
> \*\*  
> 8).Open notepad and enter

```php

<?PHP
$to = "you@yourdomain.com";
$msg = "$name

";
$msg .= "$phone

"; 
$msg .= "$email

"; 
$msg .= "$comment

"; 
mail($to, $subject, $msg, "From: My web site
Reply-To: $email
");
?> 

```

Replace the email with your own and then add all of the variables you’ve used. When you use multiple

variables you have to use “.=” as shown above in the code. The  
is just like a br in html.

It starts a new line. Make sure to have the ; as they show there is more code to come.

9).Now save this file as form.php (You’ll have to type in the extension or it will just save as txt.

10). Go to keyframe 2 and enter whatever confirmation text you want the user to see upon submiting his request.

1. Upload the .swf and the .php to your server and there you are…a mailing form ready for your

visitors.

Happy Mailing All.

:love: \*\*

this may sound stupid (i know nothing about php!) but where do i put the php code? whats notepad?

thanks

---

<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:** [June 23, 2003, 12:38pm UTC](https://forum.kirupa.com/t/php-flash-form-mail-tutorial/15694/62 "2003-06-23T12:38:13Z")

</div>

Notepad is the windows notepad program.

```php
<html>
<head><title></title></head>
<body>

<?php
CODE GOES HERE
?>

</body>
</html>

```

=)

---

<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:** [June 23, 2003, 12:41pm UTC](https://forum.kirupa.com/t/php-flash-form-mail-tutorial/15694/63 "2003-06-23T12:41:30Z")

</div>

could i just write it in word? (i’m using a mac) and save as .php?

thanks

---

<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:** [June 23, 2003, 12:47pm UTC](https://forum.kirupa.com/t/php-flash-form-mail-tutorial/15694/64 "2003-06-23T12:47:04Z")

</div>

I prefer Notepad 😉  
And dont forget to save as .PHP

---

<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:** [June 23, 2003, 12:48pm UTC](https://forum.kirupa.com/t/php-flash-form-mail-tutorial/15694/65 "2003-06-23T12:48:13Z")

</div>

lol, ok thanks!

---

<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:** [June 23, 2003, 12:53pm UTC](https://forum.kirupa.com/t/php-flash-form-mail-tutorial/15694/66 "2003-06-23T12:53:34Z")

</div>

You’re welcome  
=)

---

<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:** [June 23, 2003, 1:03pm UTC](https://forum.kirupa.com/t/php-flash-form-mail-tutorial/15694/67 "2003-06-23T13:03:41Z")

</div>

thanks, i’ll try it out now

---

<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:** [June 23, 2003, 4:11pm UTC](https://forum.kirupa.com/t/php-flash-form-mail-tutorial/15694/68 "2003-06-23T16:11:26Z")

</div>

ok, heres my php code

\<?php  
$to = "cartoonfox@hotmail.com";  
$msg = "$name

";  
$msg .= "$subject

";  
$msg .= "$email

";  
$msg .= "$message

";  
mail($to, $subject, $msg, "From: My web site  
Reply-To: $email  
");  
?\>

and heres the code for when you press send

on (release) {  
if (name eq “” or subject eq “” or email eq “” or message eq “”) {  
gotoAndStop(3);  
} else {  
loadVariablesNum(“form.php”, 0, “POST”);  
gotoAndStop(2);  
}  
}

why doesnt it send to my e-mail address?

mail($to, $subject, $msg, "From: **My web site  
Reply-To:** $email  
");  
?\>

does this have to have my web site addres on it?

loadVariablesNum(“ **form.php** ”, 0, “POST”);  
should this have the full address for the php file? ([http://216.120.237.84/~cartoon/form.php](http://216.120.237.84/~cartoon/form.php))

can someone help??:-\

---

<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:** [June 23, 2003, 4:15pm UTC](https://forum.kirupa.com/t/php-flash-form-mail-tutorial/15694/69 "2003-06-23T16:15:51Z")

</div>

does your server support PHP?

here, check this out: [http://www.kirupa.com/web/testphp.htm](http://www.kirupa.com/web/testphp.htm)

---

<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:** [June 23, 2003, 4:27pm UTC](https://forum.kirupa.com/t/php-flash-form-mail-tutorial/15694/70 "2003-06-23T16:27:57Z")

</div>

doesnt look like it does!it came up as ‘‹Ïà¡±e’ !! its free so maybe thats why (hostrocket free service)

but…, i also used [tripod.lycos.com](http://tripod.lycos.com) (i have a free host with them too) and it didnt work there either, but you said that free tripod DOES support php! so it must be something wrong with the php file or the swf 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:** [June 23, 2003, 4:30pm UTC](https://forum.kirupa.com/t/php-flash-form-mail-tutorial/15694/71 "2003-06-23T16:30:17Z")

</div>

or, it could be to do with me not using notepad but using microsoft word. whats ASCII anyway? is word one?

---

<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:** [June 24, 2003, 5:34am UTC](https://forum.kirupa.com/t/php-flash-form-mail-tutorial/15694/72 "2003-06-24T05:34:24Z")

</div>

You _can_ use Word. Just make sure you choose “Plain Text” from the drop down, and save your file with the .php extension.

ex:

```php
blah.php

```

---

<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:** [June 24, 2003, 11:24pm UTC](https://forum.kirupa.com/t/php-flash-form-mail-tutorial/15694/73 "2003-06-24T23:24:58Z")

</div>

I’m useing a Mac…

I tried three different scripts:

Jubbas’ Worked::  
\< ?PHP  
//(added “PHP” here because it’s a more widely functional syntax)  
// Recieving Variables…

$Name = $\_POST[‘name’];

$Email = “insert—\>[MyName@myDomain.com](mailto:MyName@myDomain.com)”;

$Message = $\_POST[‘message’];

$Subject = “Test E-mail Tutorial”;

$Header = “From: $Name \<$Email\>”;

//Performing Mail script…

$new = mail($Email, $Subject, $Message, $Header);  
?\>

Seratha’s didn’t work ☹ at all (???)

This one is real cool, it has IP logging and a load of error scripts in it for verifying emails and other fields - check it out::

[http://www.bigjolt.com/](http://www.bigjolt.com/) [click on… “theLab”\>“phpMailer”\>“dnldZip”]

---

<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:** [June 25, 2003, 9:50am UTC](https://forum.kirupa.com/t/php-flash-form-mail-tutorial/15694/74 "2003-06-25T09:50:53Z")

</div>

> \*Originally posted by RelandR \*  
> \*\*I’m useing a Mac…

I tried three different scripts:

Jubbas’ Worked::  
\< ?PHP  
//(added “PHP” here because it’s a more widely functional syntax)  
// Recieving Variables…

$Name = $\_POST[‘name’];

$Email = “insert—\>MyName@myDomain.com”;

$Message = $\_POST[‘message’];

$Subject = “Test E-mail Tutorial”;

$Header = “From: $Name \<$Email\>”;

//Performing Mail script…

$new = mail($Email, $Subject, $Message, $Header);  
?\>

Seratha’s didn’t work ☹ at all (???)

This one is real cool, it has IP logging and a load of error scripts in it for verifying emails and other fields - check it out::

[http://www.bigjolt.com/](http://www.bigjolt.com/) [click on… “theLab”\>“phpMailer”\>“dnldZip”] \*\*

cool thanks. i’ll try it out now and check the link. thanks:)

[Previous page](https://forum.kirupa.com/t/php-flash-form-mail-tutorial/15694.md?page=3)
