java - While saving data to mysql from my android app it removes spaces -
suppose have field in full_name. between firstname , lastname there should space. when enter -- tom cruise ,,, gives error ,, shows . takes tomcruise nicely. here code. dont have trim function. why can not save white spaces.
activity_main.xml
<textview android:text="full name" android:layout_width="wrap_content" android:layout_height="wrap_content" />
mainactivity.java giving cruicial part.
private edittext edittextname; edittextname = (edittext) findviewbyid(r.id.edittextname); string name = edittextname.gettext().tostring(); string urlsuffix = "?name="+name+"&username="+username+"&password="+password+"&email="+email;
i sending php site , save it. works fine if remove space between words.
just replace space character "%20". name = name.replace(" ","%20");
Comments
Post a Comment