httpclient=new DefaultHttpClient(); // httppost= new HttpPost("http://192.168.32.203/android_connect/check.php"); httppost= new HttpPost("http://192.168.1.101/android_connect/check.php"); // httppost= new HttpPost("http://192.168.137.1/android_connect/check.php"); //httppost= new HttpPost("http://192.168.32.203/android_connect/insert.php"); // make sure the url is correct. //add your data nameValuePairs = new ArrayList<NameValuePair>(3); // Always use the same variable name for posting i.e the android side variable name and php side variable name should be similar, nameValuePairs.add(new BasicNameValuePair("username",et.getText().toString().trim())); // $Edittext_value = $_POST['Edittext_value']; nameValuePairs.add(new BasicNameValuePair("password",pass.getText().toString().trim())); nameValuePairs.add(new BasicNameValuePair("type",agent.getContext().toString().trim())); httppost.setEntity(new UrlEncodedFormEntity(nameValuePairs)); //Execute HTTP Post Request response=httpclient.execute(httppost);
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)