# Sending variables to PHP from within movieclips

**URL:** <https://forum.kirupa.com/t/sending-variables-to-php-from-within-movieclips/15976>\
**Category:** Uncategorized\
**Created:** [March 19, 2003, 10:02pm UTC](https://forum.kirupa.com/t/sending-variables-to-php-from-within-movieclips/15976 "2003-03-19T22:02:13Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![shuga](https://avatars.discourse-cdn.com/v4/letter/s/a9adbd/32.png) [@shuga](https://forum.kirupa.com/u/shuga)\
**Post date:** [March 19, 2003, 10:02pm UTC](https://forum.kirupa.com/t/sending-variables-to-php-from-within-movieclips/15976/1 "2003-03-19T22:02:13Z")

</div>

[http://www.aaronsleeper.com/site.fla](http://www.aaronsleeper.com/site.fla)

my mail form which can be found in the above fla at \_root.window.content.mailform is not sending the variables to PHP like it’s supposed to

the PHP works fine and sends the mail to me but the only thing that comes in the mail is the text from the PHP code field names … like the things i typed in PHP to go before the contents of the variables that were supposed to be sent

so the variables are not getting from the text input fields in the flash movie … to the PHP script and to my email ☹

someone please 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:** [March 19, 2003, 10:21pm UTC](https://forum.kirupa.com/t/sending-variables-to-php-from-within-movieclips/15976/2 "2003-03-19T22:21:03Z")

</div>

i’m looking at your .fla 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:** [March 19, 2003, 11:03pm UTC](https://forum.kirupa.com/t/sending-variables-to-php-from-within-movieclips/15976/3 "2003-03-19T23:03:14Z")

</div>

ok…i got it.

I tried lots of different things, but I ended up redoing part of it.  
This is what I did:

1. I named all the instances
2. I included the field mapping to the “post” action
3. I changed the mc’s you have as send/clear into actual  
buton objects
4. put this code on the buttons:

```auto
on (release) {
	if (_root.window.content.mailform.name eq "" or _root.window.content.mailform.email eq "" or _root.window.content.mailform.message eq "") {
		_root.window.content.mailform.errortext.gotoAndStop(2);
	} else {
		loadVariablesNum("form.php", 0, "POST");
		_root.window.content.mailform.gotoAndStop(2);
		name = "";
		company = "";
		phone = "";
		email = "";
		subject = "";
		message = "";
	}
}

```

For some reason, and I’mnot 100% sure, but this code  
requires you to use actual button objects instead of mc’s.

Here’s the modified .fla: [www.unflux.com/site.fla](http://www.unflux.com/site.fla)

Let me know if you have any questions about the changes I  
made. I think you’ll have no problem figuring out what I did.

Nice site btw. 🙂

---

<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:** [March 19, 2003, 11:54pm UTC](https://forum.kirupa.com/t/sending-variables-to-php-from-within-movieclips/15976/4 "2003-03-19T23:54:56Z")

</div>

thanks very much for the compliment and the help i appreciate it

my button doesn’t bounce now ☹

i guess you can’t have everything

---

<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:** [March 20, 2003, 12:23am UTC](https://forum.kirupa.com/t/sending-variables-to-php-from-within-movieclips/15976/5 "2003-03-20T00:23:04Z")

</div>

well, what you do now, is load a movie clip inside the button’s  
properties on “over” state. I promise, it will work the same.

😉

---

<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:** [March 20, 2003, 4:24am UTC](https://forum.kirupa.com/t/sending-variables-to-php-from-within-movieclips/15976/6 "2003-03-20T04:24:27Z")

</div>

you so lost me

what about the rollOut actions ?

---

<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:** [March 20, 2003, 5:11am UTC](https://forum.kirupa.com/t/sending-variables-to-php-from-within-movieclips/15976/7 "2003-03-20T05:11:39Z")

</div>

use actionscript to run the mc on and off like you would otherwise.

have a stop action in the middle, and on the out, run it  
backwards. Make sense?

---

<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:** [March 20, 2003, 5:03pm UTC](https://forum.kirupa.com/t/sending-variables-to-php-from-within-movieclips/15976/8 "2003-03-20T17:03:43Z")

</div>

not a bit.

it’s not a tween

how do i run it backwards
