# Problems with loadVars & PHP script

**URL:** https://forum.kirupa.com/t/problems-with-loadvars-php-script/186574
**Category:** flash
**Created:** [April 22, 2006, 2:05pm UTC](https://forum.kirupa.com/t/problems-with-loadvars-php-script/186574 "2006-04-22T14:05:45Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Pup\_100](https://avatars.discourse-cdn.com/v4/letter/p/da6949/32.png) [@Pup\_100](https://forum.kirupa.com/u/Pup_100)
#### Post date: [April 22, 2006, 2:05pm UTC](https://forum.kirupa.com/t/problems-with-loadvars-php-script/186574/1 "2006-04-22T14:05:45Z")

</div>

Hi,  
I am trying to get the results of what has been typed into a form emailed to me via a PHP script.  
The form comes at the end of a multi frame movie & contains “Input Text Fields” & a “Check Box” component. The text boxes are each linked to a variable that was instigated at author time through the property panel, the check box instance is named “myCheckBox”  
This is the script I have for the form page, I’m using the loadVars object.

```auto
 _root.sub_btn.onRelease=function(){
lv=new LoadVars();
lv.name =name;
lv.sur=sur;
lv.email =email;
lv.cheq=myCheckBox.getValue();
lv.feedback=message;
lv.send("[http://ccgi.jdwyer.plus.com/cgi-bin/memail.php","POST](http://ccgi.jdwyer.plus.com/cgi-bin/memail.php)");
} 

```

The code seems to work, as when I look at the address bar for the PHP script – the variables are in encoded name-value pairs.  
I know the PHP code works as I have used it from an HTML generated form with no problems. Here is the PHP code:

```php
<?php
  //create short variable names
  $name=$HTTP_POST_VARS['name'];
  $sur=$HTTP_POST_VARS['sur'];
  $email=$HTTP_POST_VARS['email'];
  $cheq=$HTTP_POST_VARS['cheq'];
  $feedback=$HTTP_POST_VARS['feedback'];
  $toaddress = 'jdwyer@jdwyer.plus.com';
  $subject = 'Feedback from web site';
  $mailcontent = 'Customer name: '.$name."
"
                 .Customer surname: '.$sur."
"
                 .'Customer email: '.$email."
"
                 .Check box: '.$cheq."
"
                 ."Customer comments: 
".$feedback."
";
  $fromaddress = 'From: webserver@example.com';
  mail($toaddress, $subject, $mailcontent, $fromaddress);
?>

```

Currently all I’m getting is the email with just the categories shown – no variables make it across to populate the categories.
