1

Posting string from Android to PHP

view story
linux-howto

http://stackoverflow.com – First of all, thank you in advance for any help you can give. I am currently trying to connect my android application to a mysql database (Xampp). Below is the code that I am using in Android public void submitRecipe(View view) throws IOException { URL u = new URL("http://localhost/phpconnect.php"); String data = "recipe="+"mar"; HttpURLConnection conn = (HttpURLConnection) u.openConnection(); conn.setDoOutput(true); conn.setRequestProperty("Content-Type", "application/x-www-form-urlencoded"); conn.setRequestMethod("POST"); OutputStreamWriter wr = new OutputS (HowTos)