0

I have some checkboxes. User selects some items. I have to send selected items (tags) to php mysql database and receive data (rows) back. Something like online search function.
So far in android:

List<NameValuePair> params = new ArrayList<NameValuePair>();
params.add(new BasicNameValuePair("tag[i]", tag));
JSONObject json = jParser.makeHttpRequest(url_search, "GET", params);

In php side:
I think I have to use array() with while and foreach methods. But no results yet.

Namikaze Minato
  • 1,332
  • 4
  • 23
  • 41
  • since you're connecting with JSON.. on the php side you need to do `json_decode($arrayName)` to parse the data into your array and `json_encode($stuffFromDatabase)` to pass it back – John Ruddell Mar 29 '14 at 19:06
  • Hello. You can guess I'm zero in php side. I'm not sure if tag[i] works there at all and what kind of variable I can use in php side to iterate or use for loops. I would appreciate if you give some more hints. – Namikaze Minato Mar 29 '14 at 19:17
  • Im not really familiar with android, so I don't know how much help I can be. But here are a few links that are for the php side. http://www.w3schools.com/php/php_mysql_connect.asp.... one for JSON http://stackoverflow.com/questions/19004783/reading-json-post-using-php – John Ruddell Mar 29 '14 at 20:06

0 Answers0