I am downloading data from a php file using miniAjax. Here is what the beginning of the code looks like:
microAjax("genjsonphp.php", function(data) {
var json = JSON.parse(data);
var points = json;
//code continues
In java/android I am able to add information so that in the php file I can filter the data based off of user preferences:
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();
How do I change my microAjax function so that I send information to the php file ‘genjsonphp.php’ in order to filter results? Is is similar as in java/android?
I just checked on the platform hosted on code.google.com and from the looks of it, there is no way to pass parameter through post. But you can technically do through GET. modify you
genjsonphp.php?param=1¶m2=2see if that works