# Why is flash not reading the right PHP echo variable?

**URL:** <https://forum.kirupa.com/t/why-is-flash-not-reading-the-right-php-echo-variable/232496>\
**Category:** flash\
**Created:** [July 14, 2007, 2:12pm UTC](https://forum.kirupa.com/t/why-is-flash-not-reading-the-right-php-echo-variable/232496 "2007-07-14T14:12:14Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bodom78](https://avatars.discourse-cdn.com/v4/letter/b/aca169/32.png) [@Bodom78](https://forum.kirupa.com/u/Bodom78)\
**Post date:** [July 14, 2007, 2:12pm UTC](https://forum.kirupa.com/t/why-is-flash-not-reading-the-right-php-echo-variable/232496/1 "2007-07-14T14:12:14Z")

</div>

I’m passing a variable back to flash from PHP but flash is always reading the last set variable despite the “if” statement.

```php

$testvar = true;
	if( $testvar ) {
		echo "&reply=true&";
	}else{
		echo "&reply=false&";
	}

```

in a browser it echo’s “&reply=true&” so flash should trace true, right?

Well in flash it will always trace reply as “false”, even if I comment out the else clause.

this is what I have in flash:

```php

var processVars = new LoadVars();
processVars.sendAndLoad("check.php", processVars, 'POST');

processVars.onLoad = function(ok) {
if(ok){
	trace(this.reply)
	}
}

```
