I had created an ajax request in sencha touch 2, when i get a success message how can i set my return values to session and please also tell me a way through which i can get the value from session also.
submitLoginForm: function() {
var form = this.getLoginForm().getValues();
Ext.Ajax.request({
url: '../../authenticate.php',
method: 'POST',
params: {
email: form.email,
password: form.password
},
success: function(response) {
var json = Ext.decode(response.responseText);
if(json.message == 'success') {
Ext.Msg.alert('Login Success.....');
//Here i want to store return data in session
} else {
Ext.Msg.alert('Invalid Login Or Password.....');
}
},
failure: function(response) {
Ext.Msg.alert('The request failed.....');
}
});
},