# Checking value of var from php

**URL:** <https://forum.kirupa.com/t/checking-value-of-var-from-php/318372>\
**Category:** Uncategorized\
**Created:** [January 18, 2011, 11:54am UTC](https://forum.kirupa.com/t/checking-value-of-var-from-php/318372 "2011-01-18T11:54:26Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![RobLamox](https://avatars.discourse-cdn.com/v4/letter/r/e0b2c6/32.png) [@RobLamox](https://forum.kirupa.com/u/RobLamox)\
**Post date:** [January 18, 2011, 11:54am UTC](https://forum.kirupa.com/t/checking-value-of-var-from-php/318372/1 "2011-01-18T11:54:26Z")

</div>

Hi

I have a var thats created in php.

```php
$toFlash = 1

```

How do I check it in as2? I hhave tried the following but its not working (in fact I have tried a couple of different things and had no joy!

```auto
 myVars.sendAndLoad("post.php", myVars, 'POST');
        myVars.onLoad = function(){
            if (this.toFlash == 1) {
                _root.gotoAndStop(18);
            } else {
                _root.gotoAndStop(19);
            }

```

my code always goes to frame 19!!
