# Sendandload hmmmmm

**URL:** <https://forum.kirupa.com/t/sendandload-hmmmmm/223593>\
**Category:** Uncategorized\
**Created:** [April 24, 2007, 4:56am UTC](https://forum.kirupa.com/t/sendandload-hmmmmm/223593 "2007-04-24T04:56:54Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![nameez](https://avatars.discourse-cdn.com/v4/letter/n/2acd7d/32.png) [@nameez](https://forum.kirupa.com/u/nameez)\
**Post date:** [April 24, 2007, 4:56am UTC](https://forum.kirupa.com/t/sendandload-hmmmmm/223593/1 "2007-04-24T04:56:54Z")

</div>

i want to check if a user is logged using sendandload from flash to php.this is code i’m using

```auto

var obj:Object = new Object();
function getLoggedStatus() {
    //Impelement XML SendAndLoad/////
    varSender = new LoadVars();
    varReceiver = new LoadVars();
    varSender.osCsid = _global.s_id;
    varReceiver.onLoad = function(success) {
        if (success) {
            trace("returning "+this.islogged);
            obj.islogged = this.islogged;//returned from main.php
            obj.username = this.username;//returned from main.php
            return (obj);
        } else {
            trace("failed");
        }
    };
    varSender.sendAndLoad("http//path/main.php", varReceiver, "GET");
    
}

saveImage_btn.onRelease = function() {
    var logStatus = getLoggedStatus();
    trace(logStatus.islogged);
}

```

when i test the code  
trace("returning "+this.islogged); which is inside the onload function traces after trace(logStatus.islogged); which is inside onRelease of the button  
so logStatus is undefined…

how can i eleminate this

thanks  
:-/
