The httpPost() java class here,
public String getXmlFromUrl_NewRegistration(String url,
String username, String firstname, String lastname, String email,
String password) {
String json = null;
try {
// defaultHttpClient
DefaultHttpClient httpClient = new DefaultHttpClient();
HttpPost httpPost = new HttpPost("http://aleedex.biz/game/users.php?action=new");
String postParameter = "username=" + username + "&firstname="
+ firstname + "&lastname=" + lastname + "&email=" + email
+ "&password=" + password;
try {
httpPost.setEntity(new StringEntity(postParameter));
} catch (Exception e) {
}
HttpResponse httpResponse = httpClient.execute(httpPost);
HttpEntity httpEntity = httpResponse.getEntity();
json = EntityUtils.toString(httpEntity);
} catch (UnsupportedEncodingException e) {
} catch (ClientProtocolException e) {
} catch (IOException e) {
json = null;
}
Log.d("json", json);
return json;
}
Also use same parameters in httpGet(), like username, firstname, lastname, email, password
how to register the user through httpGet() with same parameters on that link http://aleedex.biz/game/users.php?action=new