Salve ,riesco ad effettuare il login con successo,ora vorrei che mi riconoscesse il tipo di accesso generico o amministratore(nel file php ho memorizzato user e pass di un utente generico in una variabile a ed user e pass dell'amm. in una variabile b.
ora vorrei che mi restituisse il tipo di utente che si è loggato come devo fare ?????![]()
![]()
vi posto il mio code:
on (release)
{
if(userName.length > 0 && userPassword.length > 0)
//if(userAdmin.length > 0 && passAdmin.length > 0)
{
myVars = new LoadVars();
myVars.username = userName.text
myVars.pass = userPassword.text
myVars.action = 'login';
myVars.sendAndLoad(php_file, myVars, 'POST');
myVars.onLoad = function()
{
if(!this.error && this.user > 0)
{
_root.gotoAndStop('registered');
} else {
_root.gotoAndStop('no_registered');
}
}
}
}

Rispondi quotando