# Flash script interact with php

**URL:** <https://forum.kirupa.com/t/flash-script-interact-with-php/162172>\
**Category:** Uncategorized\
**Created:** [September 10, 2005, 11:59am UTC](https://forum.kirupa.com/t/flash-script-interact-with-php/162172 "2005-09-10T11:59:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lucide](https://avatars.discourse-cdn.com/v4/letter/l/f6c823/32.png) [@Lucide](https://forum.kirupa.com/u/Lucide)\
**Post date:** [September 10, 2005, 11:59am UTC](https://forum.kirupa.com/t/flash-script-interact-with-php/162172/1 "2005-09-10T11:59:48Z")

</div>

Hey,

I making a mail form but get stuck on something, im having a flash script looking like this

```auto
on (release) { 
// create LoadVars(); Object
emailForm = new LoadVars();
// Attach vars to object
emailForm.totalName = firstName + " " +lastName;
emailForm.emailAddr = emailAddr;
emailform.adres = adres; 
emailForm.messageBox = messageBox;
emailForm.newvar = myComboBox.getValue();
//traces vars
trace (emailForm.firstName);
trace (emailForm.lastName);
trace (emailForm.emailAddr);
trace (emailform.adres); 
trace (emailForm.messageBox);
trace (emailForm.newvar);
// Send vars out with sendAndLoad
emailForm.sendAndLoad("viperMail.php",emailForm,"POST");
_root.contactClip.gotoAndPlay("thank");
}

```

And a php code like this

```auto
<?php 
$interest = $_POST["newvar"]; 
$comment = $_POST["messageBox"];
$EmailBody = "Keuze van workshop: $interest 
Message: $comment"; 
$sendTo = "[email="info@moonsmile.nl"]info@moonsmile.nl[/email]";
$subject = "Inschrijving Workshop";
$headers = "From: " . $_POST["totalName"];
$headers .= "<" . $_POST["emailAddr"] . ">
";
$headers .= "Reply-To: " . $_POST["emailAddr"] . "
";
$headers .= "Return-Path: " . $_POST["emailAddr"];
$message = $EmailBody;
mail($sendTo, $subject, $message, $headers);
?>

```

I know how to ad a extra var in flash as you can see

```auto
emailform.adres = adres;

```

```auto
trace (emailform.adres);

```

But my question is: what must I put in the php then? to make it work correct?

Many thanks Michael
