@@ -0,0 +1,3807 @@
+package com.example.my.project;%0A%0Aimport android.content.Intent;%0Aimport android.database.Cursor;%0Aimport android.database.sqlite.SQLiteDatabase;%0Aimport android.support.v7.app.AppCompatActivity;%0Aimport android.os.Bundle;%0Aimport android.util.Log;%0Aimport android.view.View;%0Aimport android.widget.Button;%0Aimport android.widget.EditText;%0Aimport android.widget.ImageButton;%0Aimport android.widget.Toast;%0A%0Apublic class Second extends AppCompatActivity %7B%0A    EditText username,password,repassword,city,phone,email;%0A    ImageButton back;%0A    Button signup;%0A    String s1,s2,s3,s4,s5,s6;%0A%0A    @Override%0A    protected void onCreate(Bundle savedInstanceState) %7B%0A        super.onCreate(savedInstanceState);%0A        setContentView(R.layout.activity_second);%0A        signup=(Button)findViewById(R.id.signup);%0A        username=(EditText)findViewById(R.id.editText3);%0A        password=(EditText)findViewById(R.id.editText4);%0A        repassword=(EditText)findViewById(R.id.editText5);%0A        city=(EditText)findViewById(R.id.editText6);%0A        phone=(EditText)findViewById(R.id.editText7);%0A        email=(EditText)findViewById(R.id.editText8);%0A%0A%0A%0A        signup.setOnClickListener(new View.OnClickListener() %7B%0A            @Override%0A            public void onClick(View v) %7B%0A                s1=username.getText().toString();%0A                s2=password.getText().toString();%0A                s3=repassword.getText().toString();%0A                s4=city.getText().toString();%0A                s5=phone.getText().toString();%0A                s6=email.getText().toString();%0A%0A                if(s1.isEmpty()%7C%7Cs2.isEmpty()%7C%7Cs3.isEmpty()%7C%7Cs4.isEmpty()%7C%7Cs5.isEmpty()%7C%7Cs6.isEmpty())%0A                %7B%0A                    Toast.makeText(Second.this,%22Enter all fields%22,Toast.LENGTH_SHORT).show();%0A                %7D%0A                else%0A                %7B%0A                    if(s2.equals(s3)==false)%0A                    %7B%0A                        Toast.makeText(Second.this,%22Passwords not Match%22,Toast.LENGTH_SHORT).show();%0A                    %7D%0A%0A                    else%0A                    %7B%0A                        SQLiteDatabase data = openOrCreateDatabase(%22magic%22, MODE_PRIVATE, null);%0A                        data.execSQL(%22create table if not exists user (name varchar, password varchar, email varchar, city varchar, phone varchar)%22);%0A%0A%0A%0A                        String x = %22select * from user where name='%22 + s1 + %22'%22;%0A                        Cursor cursor = data.rawQuery(x, null);%0A%0A                        String y = %22select * from user where email='%22 + s6 + %22'%22;%0A                        Cursor cursor2  = data.rawQuery(y,null);%0A%0A                        if (cursor.getCount() %3E 0) %7B%0A                            cursor.close();%0A                            Toast.makeText(Second.this, %22User already exists %22, Toast.LENGTH_SHORT).show();%0A                        %7D%0A                        else %7B%0A                            cursor.close();%0A%0A%0A%0A                            if(cursor2.getCount()%3E0)%0A                            %7B%0A                                cursor2.close();%0A                                Toast.makeText(Second.this,%22Email already registered%22,Toast.LENGTH_SHORT).show();%0A                            %7D%0A                            else%0A                            %7B%0A                                cursor2.close();%0A%0A                                data.execSQL(%22insert into user values ('%22 + s1 + %22','%22 + s2 + %22','%22+s6+%22','%22+s4+%22','%22+s5+%22')%22);%0A                                Toast.makeText(Second.this, %22Database Updated%22, Toast.LENGTH_SHORT).show();%0A                                Intent i = new Intent(Second.this, MainActivity.class);%0A                                startActivity(i);%0A                            %7D%0A%0A                        %7D%0A%0A                    %7D%0A                %7D%0A%0A            %7D%0A        %7D);%0A    %7D%0A%7D%0A

Create Second.java