title: My App is giving the "Register Error 1" - why so?
body: <p>i am trying to write a class that would collect data from the registration form and send it to an online database, i am doing that through volley, but i keep getting the same error "Registration Error 1", I already checking my database connection and the PHP Registration code and it is okay. i think the problem is from this class. The error now has changed. Now i am getting a "Registration Error 2"</p>
  
  <pre><code>private void Register () {
      loading.setVisibility (View.VISIBLE);
      signUpBtn.setVisibility (View.GONE);
  
      final String firstName = this.firstName.getText ().toString ().trim ();
      final String lastName = this.lastName.getText ().toString ().trim ();
      final String userEmail = this.userEmail.getText ().toString ().trim ();
      final String userPassword = this.userPassword.getText ().toString ().trim ();
      final String name = firstName + " " + lastName;
  
      StringRequest stringRequest = new StringRequest (Request.Method.POST, URL_REGIST,
              new Response.Listener&lt;String&gt; () {
                  @Override
                  public void onResponse (String response) {
  
                      try {
                          JSONObject jsonObject = new JSONObject (response);
                          String success = jsonObject.getString ("success");
  
                          if (success.equals ("1")) {
                              Toast.makeText (Registration.this, "Registration Successful", Toast.LENGTH_SHORT).show ();
                          }
                      } catch(JSONException e) {
                          e.printStackTrace ();
                          Toast.makeText (Registration.this, "Registration Error 1!", Toast.LENGTH_SHORT).show ();
                          loading.setVisibility (View.GONE);
                          signUpBtn.setVisibility (View.VISIBLE);
                      }
                  }
              },
              new Response.ErrorListener () {
                  @Override
                  public void onErrorResponse (VolleyError error) {
                      Toast.makeText (Registration.this, "Registration Error 2!", Toast.LENGTH_SHORT).show ();
                      loading.setVisibility (View.GONE);
                      signUpBtn.setVisibility (View.VISIBLE);
                  }
              }) {
  
          @Override
          protected Map&lt;String, String&gt; getParams () throws AuthFailureError {
              Map&lt;String, String&gt; params = new HashMap&lt;&gt; ();
              params.put ("name", name);
              params.put ("userEmail", userEmail);
              params.put ("userPassword", userPassword);
  
              return super.getParams ();
          }
      };
      RequestQueue requestQueue = Volley.newRequestQueue (this);
      requestQueue.add (stringRequest);
  }
  </code></pre>
  
  <p>i checked the logcat and this is what i am getting. 
  2019-09-23 12:05:46.354 26011-26011/com.scoutfrika.scoutfrika W/IInputConnectionWrapper: getSelectedText on inactive InputConnection</p>
  
  <p>2019-09-23 12:05:48.514 26011-26011/com.scoutfrika.scoutfrika W/IInputConnectionWrapper: getSelectedText on inactive InputConnection</p>
  
  <p>2019-09-23 12:05:51.422 26011-26011/com.scoutfrika.scoutfrika W/IInputConnectionWrapper: getSelectedText on inactive InputConnection</p>
  
  <p>2019-09-23 12:05:52.032 26011-26011/com.scoutfrika.scoutfrika W/IInputConnectionWrapper: getSelectedText on inactive InputConnection
  2019-09-23 12:05:56.446 1912-26100/? E/FA: Name must consist of letters, digits or _ (underscores). Type, name: event, isNetworkConnected:false</p>
  
  <p>2019-09-23 12:05:56.449 1912-26100/? E/FA: Invalid public event name. Event will not be logged (FE): isNetworkConnected:false</p>
  
  <p>2019-09-23 12:05:57.206 26011-26011/com.scoutfrika.scoutfrika W/IInputConnectionWrapper: getSelectedText on inactive InputConnection</p>
  
  <p>2019-09-23 12:05:59.335 1912-26100/? E/FA: Name must consist of letters, digits or _ (underscores). Type, name: event, isNetworkConnected:false</p>
  
  <p>2019-09-23 12:05:59.337 1912-26100/? E/FA: Invalid public event name. Event will not be logged (FE): isNetworkConnected:false</p>