In my Android project I have a main screen, the Java class associated with this activity holds an 'id' variable, how do I send this 'id' to a PHP so I can then run a query on my database?
Essentially what I want to do is get the 'id' variable from the Java class, then run a query SELECT * FROM table WHERE id = ?
on the PHP file.
HttpURLConnection
and make a get request to the PHP script. Example :www.example.com/index.php?id=1
.