I want to make a simple login and register app, so the user can create an account. (name, username, password) I use WAMP and a MYSQL database where I store the accounts.
I think you are finishing the context before backgrounTask finish, and Context you pass no longer exist. You can try:
Use appContext : new BackgroundTask(Register.this.getApplicationContext());
Or, Wait for BackgroundTask finish : remove finish() after .execute(...) and add finish() onPostExecute