web services - Login in android with credentials -
this question has answer here:
- how concatenate 2 strings in java? 19 answers
i working on chat application in have set login id password credentials edittext , according responce , have go further screens.
when using credentials statically, getting response webservice
string url="http://tokerapp.com/ws/get_login.php?username=rc&password=rahul"; try { string res=customhttpclient.executehttpget(url); log.e("$$$$$$$$",res);
but when taking credentials edittexts, giving me proper response.
tvlogin = (edittext)findviewbyid(r.id.editusername); tvpass = (edittext)findviewbyid(r.id.editpassword); btnlogin = (button)findviewbyid(r.id.btnlogin); btnlogin.setonclicklistener(new view.onclicklistener() { @override public void onclick(view v) { string usrnme = tvlogin.gettext().tostring().trim(); string psswrd = tvpass.gettext().tostring().trim(); string url="http://tokerapp.com/ws/get_login.php?username=usrnme&password=psswrd"; try { string res=customhttpclient.executehttpget(url); log.e("$$$$$$$$",res);
string url="http://tokerapp.com/ws/get_login.php?username=" + usrnme + "&password=" + psswrd;
Comments
Post a Comment