# Problem sending variables to php

**URL:** <https://forum.kirupa.com/t/problem-sending-variables-to-php/13735>\
**Category:** Uncategorized\
**Created:** [February 17, 2003, 3:21pm UTC](https://forum.kirupa.com/t/problem-sending-variables-to-php/13735 "2003-02-17T15:21:43Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ghostz](https://avatars.discourse-cdn.com/v4/letter/g/c67d28/32.png) [@ghostz](https://forum.kirupa.com/u/ghostz)\
**Post date:** [February 17, 2003, 3:21pm UTC](https://forum.kirupa.com/t/problem-sending-variables-to-php/13735/1 "2003-02-17T15:21:43Z")

</div>

Hi, thanx for reading this… I really need help on this…  
i’ve been trying out for a long time to send variables to php, but it just doesn’t work for me… i don’t know why…

i’ve been reading some tutorials on this and i followed exactly, but i can’t seem to be able to send variables from flash to php

> **[Advanced form using Flash and PHP](https://www.dmxzone.com/go/829/advanced-form-using-flash-and-php)**
>
> This tutorial is a follow up to my other tutorial 'Form with PHP and Flash', this time I have covered adding elements like a drop down menu and check boxes. This tutorial is for Flash 5 only.

this link one of the example that i tried… i actually just posted the everything, only modifying the recipient email addressi n the php file to my own email add just to test out…  
the form supposed to post the details filled inside to my email address, but all i get from the email are variable names, as written in the php file…

i tried a simpler one… with three text input field named  
MailFrom, Subject, Body

the actionscript used to send is

on (release) {  
loadVariablesNum (“[http://www.yourhost.com/EmailHandle.php](http://www.yourhost.com/EmailHandle.php)”, 0, “POST”);  
}

and the php:

\<?php  
//Send to Variable  
$MailTo = “[youremail@host.com](mailto:youremail@host.com)”;

//Send Mail  
mail($MailTo, $Subject, $Body, “From: $MailFrom”);  
?\>

this was obtained from  
[http://www.flashmove.com/tips/phpflashemail.htm](http://www.flashmove.com/tips/phpflashemail.htm)

of course i changed the email to my own… and i did receive an email from this form, but with empty subject, body and sender name

so i guess that the php file didn’t actually get the variable from flash…  
i even tried putting values to the three variables instead of using input text field, but it still doesn’t work… can anyone help me on this…  
i’m really desperate to find out why… thanx

---

<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:** [February 17, 2003, 3:24pm UTC](https://forum.kirupa.com/t/problem-sending-variables-to-php/13735/2 "2003-02-17T15:24:38Z")

</div>

at the top of the PHP page put

```php

$Subject = $_POST['Subject'];
$Body = $_POST['Body'];
$MailFrom = $_POST['MailFrom'];

```

that might work.

---

<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:** [February 17, 2003, 3:40pm UTC](https://forum.kirupa.com/t/problem-sending-variables-to-php/13735/3 "2003-02-17T15:40:17Z")

</div>

thanx a lot… it works!!

---

<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:** [February 17, 2003, 3:46pm UTC](https://forum.kirupa.com/t/problem-sending-variables-to-php/13735/4 "2003-02-17T15:46:55Z")

</div>

awesome. glad I could have helped 🙂
