java - Error in Http Post -



java - Error in Http Post -

i m beginner in android development , i'm using using this code , utilize method post info in url. phone call method async task.

and show error in httpresponse

error: caused by: java.lang.illegalstateexception: target host must not null, or set in parameters. scheme=null, host=null, path=192.168.56.1/android_connect/get_users.php

php code:

$username = @$_post['username']; $password = @$_post['password']; $mysql_query = mysql_query(" insert `android_connect1`.`user` ( `username` , `password` ) values ( '$username', '$password')");

this http host error.

use this

httppost httppost = new httppost("http://192.168.56.1/android_connect/get_users.php");

instead of

httppost httppost = new httppost("192.168.56.1/android_connect/get_users.php");

java php android android-asynctask http-post

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -