如何在执行php文件以从SQL数据库获取信息时上传数据以用作过滤器


How to upload data to use as filter when executing php file to get information from an SQL database?

我正在使用miniAjax从php文件下载数据。以下是代码的开头:

microAjax("genjsonphp.php", function(data) {
      var json = JSON.parse(data);
      var points = json;
//code continues

在java/android中,我可以添加信息,以便在php文件中根据用户偏好过滤数据:

nameValuePairs.add(new BasicNameValuePair("startd", startd));
    nameValuePairs.add(new BasicNameValuePair("endd", endd));
HttpClient httpclient = new DefaultHttpClient();
        // *************************************************************************************
        HttpPost httppost = new    HttpPost("http://someguyz.hostei.com/info.php");
//*************************************************************************************
        httppost.setEntity(new UrlEncodedFormEntity(nameValuePairs));
        HttpResponse response = httpclient.execute(httppost);
        HttpEntity entity = response.getEntity();
        is = entity.getContent();     

如何更改我的microAjax函数,以便将信息发送到php文件"genjsonph.php"以过滤结果?是类似于在java/android?

我刚刚查看了托管在code.google.com上的平台,从外观上看,没有办法通过post传递参数。但从技术上讲,你可以通过GET来实现。修改您的genjsonphp.php?param=1&param2=2,看看它是否有效