<?php
//connect to the local database.
//check to connect to test database
//do select query.
$result = mysql_query('SELECT userName,password,name,accountType from user');
//generate user array;
'userName' => $data['userName']
,'password' => $data['password']
,'name' => $data['name']
,'accountType'=> $data['accountType']
);
}
//close the connection of localhost;
//encode user array to JASON;
echo $json;
?>
PD9waHAKLy9jb25uZWN0IHRvIHRoZSBsb2NhbCBkYXRhYmFzZS4KJGxpbmsgPSBteXNxbF9jb25uZWN0KCdsb2NhbGhvc3QnLCdyb290JywgJycpOwoKLy9jaGVjayB0byBjb25uZWN0IHRvIHRlc3QgZGF0YWJhc2UKJGRiX3NlbGVjdGVkID0gbXlzcWxfc2VsZWN0X2RiKCd0ZXN0JywgJGxpbmspOwoKLy9kbyBzZWxlY3QgcXVlcnkuCiRyZXN1bHQgPSBteXNxbF9xdWVyeSgnU0VMRUNUIHVzZXJOYW1lLHBhc3N3b3JkLG5hbWUsYWNjb3VudFR5cGUgZnJvbSB1c2VyJyk7CgovL2dlbmVyYXRlIHVzZXIgYXJyYXk7CndoaWxlICgkZGF0YSA9IG15c3FsX2ZldGNoX2FycmF5KCRyZXN1bHQpKSB7CiAgICAkdXNlcltdID0gYXJyYXkoCgkJJ3VzZXJOYW1lJyA9PiAkZGF0YVsndXNlck5hbWUnXQoJCSwncGFzc3dvcmQnID0+ICRkYXRhWydwYXNzd29yZCddCgkJLCduYW1lJyA9PiAkZGF0YVsnbmFtZSddCgkJLCdhY2NvdW50VHlwZSc9PiAkZGF0YVsnYWNjb3VudFR5cGUnXQoJKTsKfQovL2Nsb3NlIHRoZSBjb25uZWN0aW9uIG9mIGxvY2FsaG9zdDsKJGNsb3NlX2ZsYWcgPSBteXNxbF9jbG9zZSgkbGluayk7CgovL2VuY29kZSB1c2VyIGFycmF5IHRvIEpBU09OOwokanNvbiA9IGpzb25fZW5jb2RlKCR1c2VyKTsKZWNobyAkanNvbjsKPz4=