Situation : How can I encrypt json in the page getuser.php and then decrypt it in index.php?
I got a getuser.php that creates echo (json_encode($data));
with a example output
{
"id": 2,
"username": "Teeto",
"surname": "",
"password": "somepassword",
"lastlogin": "2014-02-18 15:35:01",
"level": 0
}
Then I get the data to jquery
$.ajax({
type: 'POST',
url: "getuserdata.php?id="+ otherPro,
datatype: 'json',
success: function(data){
$.each(data, function (key, value) {
$( '#' + key ).val( value );
});
}
});
Thanks for any tips.