# Sendandload undefined variable receiving

**URL:** https://forum.kirupa.com/t/sendandload-undefined-variable-receiving/215974
**Category:** Uncategorized
**Created:** [February 12, 2007, 5:08pm UTC](https://forum.kirupa.com/t/sendandload-undefined-variable-receiving/215974 "2007-02-12T17:08:46Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![goxel](https://avatars.discourse-cdn.com/v4/letter/g/bcef8e/32.png) [@goxel](https://forum.kirupa.com/u/goxel)
#### Post date: [February 12, 2007, 5:08pm UTC](https://forum.kirupa.com/t/sendandload-undefined-variable-receiving/215974/1 "2007-02-12T17:08:46Z")

</div>

output is “error” even i send “hello”. what is the problem here?\*\*

actionscript\*\*

```auto

function dothis() {
    sv = new LoadVars();
    rv = new LoadVars();
    sv.v1 = "hello";
    sv.sendAndLoad("newsletter.php", rv);
    rv.onLoad = function(obj) {
        trace(rv.var1);
    };
}

```

\*\*

php  
\*\*

```auto

$var1=$_POST["v1"];
if($var1=="hello") echo "&var1=ok&"; else echo "&var1=error&";

```
