# Pass variables to php and posting it

**URL:** <https://forum.kirupa.com/t/pass-variables-to-php-and-posting-it/232749>\
**Category:** flash\
**Created:** [July 17, 2007, 2:09pm UTC](https://forum.kirupa.com/t/pass-variables-to-php-and-posting-it/232749 "2007-07-17T14:09:40Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![lambros](https://avatars.discourse-cdn.com/v4/letter/l/eb9ed0/32.png) [@lambros](https://forum.kirupa.com/u/lambros)\
**Post date:** [July 17, 2007, 2:09pm UTC](https://forum.kirupa.com/t/pass-variables-to-php-and-posting-it/232749/1 "2007-07-17T14:09:40Z")

</div>

hey guys i am making a flash email form and i have my input filds and i declared my variables too using this

```auto
var variables:URLVariables = new URLVariables();

            variables.senderName = senderName_txt.text;
            variables.replyAddress = replyAdress_txt.text;
            variables.telephone = telephone_txt.text;
            variables.subject = subject_txt.text;
            variables.messageBody = messageBody_txt.text;

```

how do i pass these variable to my php file named contact.php located in the same folder and make it sent to my email ???

this is the code of my php file :

```auto
<?php
$sendTo = "my email is here";

$senderName = $_POST["senderName"];
$replyAddress = $_POST["replyAdress"];
$subject = $_POST["subject"];
$messageBody = $_POST["messageBody"];

$headers = "From: " . $senderName . " <" . $replyAddress . ">
";

mail($sendTo, $subject, $messageBody, $headers);

?>

```

edit: i forgot to tell you that i want a code for AS3 !!!
