Checking value of var from php

Hi

I have a var thats created in 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!

 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!!