title: org.json.JSONException: No value for
body: <p>*EDIT:</p>
  
  <p>So I've asked the PHP Guy, and yes he forgot to write the <code>"fullname"</code> string in his code. Sorry for my mistake.</p>
  
  <p>I'm new in Java Android, so a lil bit confuse about this code. What I'm trying to do is get the value, but it always whot this error in Android Studio :</p>
  
  <pre><code>W/System.err: org.json.JSONException: No value for fullname
  W/System.err:     at org.json.JSONObject.get(JSONObject.java:355)
  W/System.err:     at org.json.JSONObject.getString(JSONObject.java:515)
  W/System.err:     at com.skafen.bayarin.ServerRequests$fetchUserDataAsyncTask.doInBackground(ServerRequests.java:130)
  W/System.err:     at com.skafen.bayarin.ServerRequests$fetchUserDataAsyncTask.doInBackground(ServerRequests.java:93)
  W/System.err:     at android.os.AsyncTask$2.call(AsyncTask.java:288)
  W/System.err:     at java.util.concurrent.FutureTask.run(FutureTask.java:237)
  W/System.err:     at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
  W/System.err:     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
  W/System.err:     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
  W/System.err:     at java.lang.Thread.run(Thread.java:841)
  </code></pre>
  
  <p>And the java is :</p>
  
  <pre><code>public class fetchUserDataAsyncTask extends AsyncTask&lt;Void, Void, User&gt; { //line #93
  
          User user;
          GetUserCallback userCallback;
  
          public fetchUserDataAsyncTask(User user, GetUserCallback userCallback) {
              this.user = user;
              this.userCallback = userCallback;
  
          }
  
          @Override
          protected User doInBackground(Void... params) {
              ArrayList&lt;NameValuePair&gt; dataToSend = new ArrayList&lt;&gt;();
              dataToSend.add(new BasicNameValuePair("username", user.username));
              dataToSend.add(new BasicNameValuePair("password", user.password));
  
              HttpParams httpRequestParams = new BasicHttpParams();
              HttpConnectionParams.setConnectionTimeout(httpRequestParams, CONNECTION_TIMEOUT);
              HttpConnectionParams.setSoTimeout(httpRequestParams, CONNECTION_TIMEOUT);
  
              HttpClient client = new DefaultHttpClient(httpRequestParams);
              HttpPost post = new HttpPost(SERVER_ADDRESS + "FetchUserData.php");
  
  
              User returnedUser = null;
              try {
                  post.setEntity(new UrlEncodedFormEntity(dataToSend));
                  HttpResponse httpResponse =  client.execute(post);
  
                  HttpEntity entity = httpResponse.getEntity();
                  String result = EntityUtils.toString(entity);
                  JSONObject jObject = new JSONObject(result);
  
                  if (jObject.length() == 0 ){
                      returnedUser = null;
                  }else {
                      String fullname = jObject.getString("fullname"); //line #130
                      int birthday = jObject.getInt("birthday");
                      String email = jObject.getString("email");
  
                      returnedUser = new User(fullname, birthday, email, user.username, user.password);
                  }
  
              }catch (Exception e){
                  e.printStackTrace();
              }
  
              return returnedUser;
          }
  
          @Override
          protected void onPostExecute(User returnedUser) {
              progressDialog.dismiss();
              userCallback.done(returnedUser);
              super.onPostExecute(returnedUser);
          }
      }
  </code></pre>
  
  <p>Thanks for the attention, and sorry if I post a new thread with same topic because I'm new here.</p>
  
  <p>Thanks.</p>