How to send JSONArray string to php server using multipart entity in android -



How to send JSONArray string to php server using multipart entity in android -

i unable send jsonarray string php server using multipart entity in android. have tried next it's not working:

multipartentity entity = new multipartentity(httpmultipartmode.browser_compatible,boundary,charset.defaultcharset()); entity.addpart("invite_friend", new stringbody(friendsarray));

in php server side should come like:

'invite_friend' => array ( 0 => '800' 1 => '794' )

what done, please provide suggestions.

you can this.

// prepare category array (string mfrndsid : friendsarray) { reqentity.addpart("invite_friend[]", new stringbody(mfrndsid)); }

just add together [] array tag , paas values in loop in it. here invite_friend array tag. can pass values in tag using loop. post array on server.

refer reply more detail

how send string array of values in 1 key word using post method server

this may help you

php android multipartentity

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -