httpポストを使用してWebサイトにデータを投稿するために使用するAndroidアプリケーションがありますが、Webサイトにデータを投稿していません。
私のAndroidコードでは:
                   postParameters.add(new BasicNameValuePair("latitude", Double.toString(latitude)));  
                   postParameters.add(new BasicNameValuePair("longitude", Double.toString(longitude))); 
                   response = CustomHttpClient.executeHttpPost("url", postParameters);  
executeHttpPost メソッド内
public static String executeHttpPost(String url, ArrayList postParameters)
        throws Exception {
    BufferedReader in = null;
    try {
        HttpClient client = getHttpClient();
        HttpPost request = new HttpPost(url);
        UrlEncodedFormEntity formEntity = new UrlEncodedFormEntity(
                postParameters);
        request.setEntity(formEntity);
        HttpResponse response = client.execute(request);
        in = new BufferedReader(new InputStreamReader(response.getEntity()
                .getContent()));
        StringBuffer sb = new StringBuffer("");
        String line = "";
        String NL = System.getProperty("line.separator");
        while ((line = in.readLine()) != null) {
            sb.append(line + NL);
        }
        in.close();
        String result = sb.toString();
        return result;
    } finally {
        if (in != null) {
            try {
                in.close();
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
    }
}
phpソースはこちら
$lat=$_POST['latitude'];  
$long=$_POST['longitude'];  
mysql_connect('localhost','welcome','Welcome123') or die('conn error');
mysql_select_db('es')  or die('select error');
$query = "insert into GEO_LOC (GEO_LOC_LAT,GEO_LOC_LONG) values ($lat,$long)";
$result = mysql_query($query);
if($result)
{
echo 1;
}
else echo "Database Error";
?>
しかし、この post メソッドは何もしません。何か不足していますか?何か追加する必要がありますか?