Global Variable defined on login app does not work on remember me

hey there gurus,

I have a project reading infor a database which is only delivering data related to customers, such as their own details, their own jobs etc.

I then use appmysite to view this project in webviewer.

The remember_me works perfectly and auto logs in the user when selected however it seems that when the session expires, eventhough the remember_me script runs and auto logins, the customerid variable which is stored in the sec_users table and which i use in “Where” statments on all subsequent apps, does not load.

I have tried using a sclookup on multiple parts of the login app, such as in the sc_validate_success and the Validate_success event, and it still does not load the variable when the Remember me sql injection runs.

Here is the code I used, i even tried sc_set_global,

onValidateSuccess:

sc_validate_success();
$check_sql15 = “SELECT customerid FROM sec_users WHERE login = [usr_login]”;
sc_lookup(rs15, $check_sql15);
$cusid = ({rs15[0][0]});

[idcustomer] = $cusid;
sc_set_global($cusid);

Also tried at the end of phpMethod, sc_Validate_success:

$check_sql15 = “SELECT customerid FROM sec_users WHERE login = [usr_login]”;
sc_lookup(rs15, $check_sql15);
$cusid = ({rs15[0][0]});
//{customerid} = $cusid;

//sc_set_global($cusid);
[idcustomer] = $cusid;
$idcustomer = $cusid;
sc_set_global($idcustomer);
sc_redir(‘mobile_menu’);