# Phpform not mailing in holderMC

**URL:** <https://forum.kirupa.com/t/phpform-not-mailing-in-holdermc/11373>\
**Category:** Uncategorized\
**Created:** [January 16, 2003, 6:55am UTC](https://forum.kirupa.com/t/phpform-not-mailing-in-holdermc/11373 "2003-01-16T06:55:13Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Danno](https://avatars.discourse-cdn.com/v4/letter/d/e47c2d/32.png) [@Danno](https://forum.kirupa.com/u/Danno)\
**Post date:** [January 16, 2003, 6:55am UTC](https://forum.kirupa.com/t/phpform-not-mailing-in-holdermc/11373/1 "2003-01-16T06:55:13Z")

</div>

Ok… I’m rather confused.

I have a feedback form in flash. With one textfield with the var “name” and another textfield with the var “email”, one with the var “body”, and finally one with the var “returnmessage”.

These all start in a frame named “first”.

On my submit button I have :

```php

on (release) {
	loadVariables("sendform.php", this, "POST");
	gotoAndPlay("second");
	returnmessage = "Sending message in progress ...";
}

```

In the frame labeled “second”, I have :

```php

if(is_sent == 1){
	gotoAndStop("first");
}

```

and on the third frame named “third” I have:

```php

gotoAndPlay ("second");

```

In my sendform.php file, I have :

```php

<?
$toadress = "myemail@myemail.com";
$subject = "Contact Form";
$mailcontent = "From: $name.

 Email: $email

 $body";

$headers .= "From: $name<$email>
";
mail($toadress, $subject, $mailcontent, $headers);
echo "returnmessage=The message is successfully sent.&is_sent=1";
?>

```

Ok… This all works PERFECT together, if i just call up the individual .swf that this is loaded into. Once I call this .swf into a placeholder MC in my main .swf, it doesn’t work anymore. I have tried and tried and … yes… tried some more to get it to work, and I just can’t figure it out. I am TERRIBLY disturbed by this, and want to know how to fix it.

Am I correct in assuming that it has something to do with the

```php
loadVariables("sendform.php", this, "POST");

```

part of it?

I have no clue…

Pleeeeeeeeeeeease help!!!:crazy:

---

<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:** [January 17, 2003, 10:41pm UTC](https://forum.kirupa.com/t/phpform-not-mailing-in-holdermc/11373/2 "2003-01-17T22:41:05Z")

</div>

your problem may be on the following line of code:

```php

echo "returnmessage=The message is successfully sent.&is_sent=1";

```

you may wonder why… well, the variables ‘returnmessage’ and ‘is\_sent’ are stored in the main timeline of the .swf when you call loadVariables(); … your second .swf is not accesing the main timeline’s variables… at least i think so 🙂

try using instead:

```php

echo "_root:returnmessage=The message is successfully sent.&_root:is_sent=1";

```

and modify your .fla adding **\_root:** to ‘returnmessage’ and ‘is\_sent’ variables in your secondary .swf (that you load in your main .swf)

i’m not sure if this solves your problem, but it’s worth to try 🙂

---

<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:** [January 17, 2003, 10:51pm UTC](https://forum.kirupa.com/t/phpform-not-mailing-in-holdermc/11373/3 "2003-01-17T22:51:08Z")

</div>

Thanks for the help, but i figured out what the problem was… by a fluke!

Because I had a main.swf that loaded other .swf’s into a holding clip, that were located in other directories, i was putting the .php file in those directories. DOH!

I somehow saw an error that it couldn’t find the php file in the directory of where my main.swf was located… put it in there… and my script worked perfect.

I am such a dork.

:😆:

Thanks again!

---

<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:** [January 19, 2003, 8:13pm UTC](https://forum.kirupa.com/t/phpform-not-mailing-in-holdermc/11373/4 "2003-01-19T20:13:27Z")

</div>

lolz 🙂
