sara62
یک شنبه 02 آذر 1393, 18:30 عصر
سلام
با این کدا داده ها رو ارسال میکنم اما انگار ارسال نمیشه.نمیدونم کجا اشتباه کردم
ممنون میشم راهنمایی بفرمایید
HttpClient client = new DefaultHttpClient();
HttpPost post = new HttpPost("http://persianrayan.com/android.php");
try {
List<NameValuePair> item =new ArrayList<NameValuePair>();
item.add( new BasicNameValuePair("user", "admin"));
item.add( new BasicNameValuePair("pass", "admin"));
post.setEntity(new UrlEncodedFormEntity(item));
HttpResponse response1 = client.execute(post);
HttpEntity entity = response1.getEntity();
Toast.makeText(this, EntityUtils.toString(entity).toString(),Toast.LENG TH_LONG).show();
با این کدا داده ها رو ارسال میکنم اما انگار ارسال نمیشه.نمیدونم کجا اشتباه کردم
ممنون میشم راهنمایی بفرمایید
HttpClient client = new DefaultHttpClient();
HttpPost post = new HttpPost("http://persianrayan.com/android.php");
try {
List<NameValuePair> item =new ArrayList<NameValuePair>();
item.add( new BasicNameValuePair("user", "admin"));
item.add( new BasicNameValuePair("pass", "admin"));
post.setEntity(new UrlEncodedFormEntity(item));
HttpResponse response1 = client.execute(post);
HttpEntity entity = response1.getEntity();
Toast.makeText(this, EntityUtils.toString(entity).toString(),Toast.LENG TH_LONG).show();