Java后台Java。
我正在尝试在没有 JSON 的情况下创建登录注册应用程序,我的登录活动工作正常,但注册活动不起作用不知道我哪里出错了。我正在在线使用我的 sql 从 000webhost 和存储在文件管理器中的 php 文件。请帮助我找到问题。php 没有问题,因为当我在寄存器中分配值时.php插入了值,但它不是寄存器的 working.my 代码.php是寄存器 php,我的主要活动代码是
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
uname = (EditText)findViewById(R.id.editText);
pass = (EditText)findViewById(R.id.editText2);
log = (Button)findViewById(R.id.button);
signup = (Button)findViewById(R.id.button3);
}
public void OnLogin(View view){
String username = uname.getText().toString();
String passwrd= pass.getText().toString();
String type = "login";
BackgroundWorker backgroundWorker = new BackgroundWorker(this);
backgroundWorker.execute(type, username, passwrd);
}
public void GoReg(View view){
startActivity(new Intent(this,Register.class));
}
我的注册 Java 文件是
private GoogleApiClient client;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_register);
unmae = (EditText) findViewById(R.id.editText7);
surnme = (EditText) findViewById(R.id.editText3);
ag = (EditText) findViewById(R.id.editText4);
usernme = (EditText) findViewById(R.id.editText5);
passwrd = (EditText) findViewById(R.id.editText6);
// ATTENTION: This was auto-generated to implement the App Indexing API.
// See https://g.co/AppIndexing/AndroidStudio for more information.
client = new GoogleApiClient.Builder(this).addApi(AppIndex.API).build();
}
public void OnReg(View view) {
String sone = unmae.getText().toString();
String stwo = surnme.getText().toString();
String sthree = ag.getText().toString();
String sfour = usernme.getText().toString();
String sfive = passwrd.getText().toString();
String type = "register";
BackgroundWorker backgroundWorker = new BackgroundWorker(this);
backgroundWorker.execute(type, sone, stwo, sthree, sfour, sfive);
}
我的后台Java文件在这里链接后台
使用$_post
并检查您的注册页面链接不可用。