[FONT="]{ String result = [/FONT][FONT="]""[/FONT][FONT="];[/FONT][FONT="][/FONT]
[FONT="] [/FONT][FONT="]//the year data to send[/FONT][FONT="][/FONT]
[FONT="] ArrayList<NameValuePair> nameValuePairs = [/FONT][FONT="]new[/FONT][FONT="] ArrayList<NameValuePair>();[/FONT][FONT="][/FONT]
[FONT="] nameValuePairs.add([/FONT][FONT="]new[/FONT][FONT="] BasicNameValuePair([/FONT][FONT="]""[/FONT][FONT="],[/FONT][FONT="]"1980"[/FONT][FONT="]));[/FONT][FONT="][/FONT]
[FONT="] HttpClient httpclient = [/FONT][FONT="]new[/FONT][FONT="] DefaultHttpClient();[/FONT][FONT="][/FONT]
[FONT="] HttpPost httppost = [/FONT][FONT="]new[/FONT][FONT="] HttpPost([/FONT][FONT="]"http://localhost/getAllPeopleBornAfter.php"[/FONT][FONT="]);[/FONT][FONT="][/FONT]
[FONT="] [/FONT][FONT="]try[/FONT][FONT="][/FONT]
[FONT="] {[/FONT][FONT="][/FONT]
[FONT="] httppost.setEntity([/FONT][FONT="]new[/FONT][FONT="] UrlEncodedFormEntity(nameValuePairs));[/FONT][FONT="][/FONT]
[FONT="] HttpResponse response = httpclient.execute(httppost);[/FONT][FONT="][/FONT]
[FONT="] HttpEntity entity = response.getEntity();[/FONT][FONT="][/FONT]
[FONT="] [/FONT][FONT="]//convert response to string[/FONT][FONT="][/FONT]
[FONT="] [/FONT][FONT="][/FONT]
[FONT="] [/FONT][FONT="][/FONT]
[FONT="] [/FONT][FONT="][/FONT]
[FONT="] InputStream is = response.getEntity().getContent(); [/FONT][FONT="][/FONT]
[FONT="] BufferedInputStream bis = [/FONT][FONT="]new[/FONT][FONT="] BufferedInputStream(is);[/FONT][FONT="][/FONT]
[FONT="] StringBuilder sb = [/FONT][FONT="]new[/FONT][FONT="] StringBuilder();[/FONT][FONT="][/FONT]
[FONT="] [/FONT][FONT="]int[/FONT][FONT="] line = 0;[/FONT][FONT="][/FONT]
[FONT="] [/FONT][FONT="]while[/FONT][FONT="] ((line = bis.read()) != 0)[/FONT][FONT="][/FONT]
[FONT="] {[/FONT][FONT="][/FONT]
[FONT="] sb.append(line + [/FONT][FONT="]"n"[/FONT][FONT="]);[/FONT][FONT="][/FONT]
[FONT="] }[/FONT][FONT="][/FONT]
[FONT="] is.close();[/FONT][FONT="][/FONT]
[FONT="] [/FONT][FONT="][/FONT]
[FONT="] result=sb.toString();[/FONT][FONT="][/FONT]
[FONT="] }[/FONT][FONT="][/FONT]
[FONT="] [/FONT][FONT="]catch[/FONT][FONT="](Exception e)[/FONT][FONT="][/FONT]
[FONT="] {[/FONT][FONT="][/FONT]
[FONT="] Log.e([/FONT][FONT="]"log_tag"[/FONT][FONT="], [/FONT][FONT="]"Error converting result "[/FONT][FONT="]+e.toString());[/FONT][FONT="][/FONT]
[FONT="] }[/FONT][FONT="][/FONT]
[FONT="] [/FONT]
[FONT="] [/FONT][FONT="]//the year data to send[/FONT][FONT="][/FONT]
[FONT="] ArrayList<NameValuePair> nameValuePairs = [/FONT][FONT="]new[/FONT][FONT="] ArrayList<NameValuePair>();[/FONT][FONT="][/FONT]
[FONT="] nameValuePairs.add([/FONT][FONT="]new[/FONT][FONT="] BasicNameValuePair([/FONT][FONT="]""[/FONT][FONT="],[/FONT][FONT="]"1980"[/FONT][FONT="]));[/FONT][FONT="][/FONT]
[FONT="] HttpClient httpclient = [/FONT][FONT="]new[/FONT][FONT="] DefaultHttpClient();[/FONT][FONT="][/FONT]
[FONT="] HttpPost httppost = [/FONT][FONT="]new[/FONT][FONT="] HttpPost([/FONT][FONT="]"http://localhost/getAllPeopleBornAfter.php"[/FONT][FONT="]);[/FONT][FONT="][/FONT]
[FONT="] [/FONT][FONT="]try[/FONT][FONT="][/FONT]
[FONT="] {[/FONT][FONT="][/FONT]
[FONT="] httppost.setEntity([/FONT][FONT="]new[/FONT][FONT="] UrlEncodedFormEntity(nameValuePairs));[/FONT][FONT="][/FONT]
[FONT="] HttpResponse response = httpclient.execute(httppost);[/FONT][FONT="][/FONT]
[FONT="] HttpEntity entity = response.getEntity();[/FONT][FONT="][/FONT]
[FONT="] [/FONT][FONT="]//convert response to string[/FONT][FONT="][/FONT]
[FONT="] [/FONT][FONT="][/FONT]
[FONT="] [/FONT][FONT="][/FONT]
[FONT="] [/FONT][FONT="][/FONT]
[FONT="] InputStream is = response.getEntity().getContent(); [/FONT][FONT="][/FONT]
[FONT="] BufferedInputStream bis = [/FONT][FONT="]new[/FONT][FONT="] BufferedInputStream(is);[/FONT][FONT="][/FONT]
[FONT="] StringBuilder sb = [/FONT][FONT="]new[/FONT][FONT="] StringBuilder();[/FONT][FONT="][/FONT]
[FONT="] [/FONT][FONT="]int[/FONT][FONT="] line = 0;[/FONT][FONT="][/FONT]
[FONT="] [/FONT][FONT="]while[/FONT][FONT="] ((line = bis.read()) != 0)[/FONT][FONT="][/FONT]
[FONT="] {[/FONT][FONT="][/FONT]
[FONT="] sb.append(line + [/FONT][FONT="]"n"[/FONT][FONT="]);[/FONT][FONT="][/FONT]
[FONT="] }[/FONT][FONT="][/FONT]
[FONT="] is.close();[/FONT][FONT="][/FONT]
[FONT="] [/FONT][FONT="][/FONT]
[FONT="] result=sb.toString();[/FONT][FONT="][/FONT]
[FONT="] }[/FONT][FONT="][/FONT]
[FONT="] [/FONT][FONT="]catch[/FONT][FONT="](Exception e)[/FONT][FONT="][/FONT]
[FONT="] {[/FONT][FONT="][/FONT]
[FONT="] Log.e([/FONT][FONT="]"log_tag"[/FONT][FONT="], [/FONT][FONT="]"Error converting result "[/FONT][FONT="]+e.toString());[/FONT][FONT="][/FONT]
[FONT="] }[/FONT][FONT="][/FONT]
[FONT="] [/FONT]