Can anyone suggest a solution above?
For now, all I want to do is send a JSON request to my server (for example: {picture: jpg, color: green}), access the PHP database, and then return the file name from the server database (then run android file to upload file is not a problem)
Can anyone suggest an Android Framework first that will help me with this. - POST JSON to php file on my server
And secondly, a php script that will turn JSON into readable in php format (accessing the database is also not a problem, but I cannot get JSON into an object so that it matches the database)
thanks
EDIT
Thanks for the links below, but I'm not asking about it out of laziness, it's because of the annoyance at my seeming inability to send a JSON string and getting the right answer.
So let me show the code and find out why what I think should happen doesn't happen:
GET URL (using GET so I can show the work)
http://example.com/process/json.php?service=GOOGLE <?php // decode JSON string to PHP object $decoded = json_decode($_GET['json']); // I'm not sure of which of the below should work but i've tried both. $myService = $decoded->service; //$service should equal: GOOGLE $myService = $decoded->{'service'}; //$service should equal: GOOGLE // but the result is always $myService = null - why? ?>
source share