title: How to put 2 parameters in doInBackground asynctask ?
body: <p>I use <code>Asynctask</code> to load and get data from php. And I have to pass 2 parameters to php.
  But I don't know how. </p>
  
  <p>Here is the java code :</p>
  
  <pre><code>public class info extends Activity{
  
  ProgressDialog pDialog;
  TextView movie_tittle, studio, date;
  int std;
  String movie, reservation, ttl, dt;
  
  private String URL_CATEGORIES = "http://10.0.2.2/cinemainfo/info.php";
  
  JSONParser jParser = new JSONParser();
  ArrayList&lt;HashMap&lt;String, String&gt;&gt; accountsList;
  JSONArray accounts = null;
  
  private static final String TAG_SUCCESS = "success";
  private static final String TAG_ACCOUNT = "message";
  
  public void onCreate(Bundle savedInstanceState) {
  
      super.onCreate(savedInstanceState);
      setContentView(R.layout.info);
  
      movie = getIntent().getStringExtra("kode_intent"); 
      reservation = getIntent().getStringExtra("kode_intent2");
  
      movie_tittle=(TextView)findViewById(R.id.tv_tittle);
      date=(TextView)findViewById(R.id.tv_date);
      studio=(TextView)findViewById(R.id.tv_studio);
  
      new GetCategories().execute();
  
  }
  
  private class GetCategories extends AsyncTask&lt;Void, Void, Void&gt; {
  
      protected void onPreExecute() {
          super.onPreExecute();
          pDialog = new ProgressDialog(info.this);
          pDialog.setMessage("Please Wait..");
          pDialog.setCancelable(false);
          pDialog.show();
  
      }
  
      protected Void doInBackground(Void... arg0) {
          List&lt;BasicNameValuePair&gt; params = new ArrayList&lt;BasicNameValuePair&gt;();
          params.add(new BasicNameValuePair("id_movie", movie));
          params.add(new BasicNameValuePair("id_reservation", reservation));
          JSONObject json = jParser.makeHttpRequest(URL_CATEGORIES, "GET", params);
          Log.d("All Accounts: ", json.toString());
          try {
              int success = json.getInt(TAG_SUCCESS);
              if (success == 1) {
                  accounts = json.getJSONArray(TAG_ACCOUNT);
                  for (int i = 0; i &lt; accounts.length(); i++) {
  
                      JSONObject json_data = accounts.getJSONObject(i);
  
                      ttl=json_data.getString("movie_tittle");
  
                      dt=json_data.getString("date");
  
                      std = json_data.getInt("studio");
                  }
              }
  
          } catch (JSONException e) {
              e.printStackTrace();
          }
  
          return null;
      }
  
      protected void onPostExecute(Void result) {
          super.onPostExecute(result);
          if (pDialog.isShowing())
              pDialog.dismiss();
          result();
      }
  }
  
  private void result() {
      try{
  
          movie_tittle.setText(ttl);
          date.setText(dt);
          studio.setText(String.valueOf(std));
      }
  
      catch(Exception e){
          Log.e("log_tag","Error in Display!" + e.toString());;          
         }
  }
  
  }
  </code></pre>
  
  <p>I want to pass <code>id_movie</code> and <code>id_reservation</code> to php code..Both is getting from <code>movie = getIntent().getStringExtra("kode_intent");</code> and <code>reservation = getIntent().getStringExtra("kode_intent2");</code> </p>
  
  <p>But when I run the code in emulator, It displays nothing..The php code is fine..But I'm not sure with my java code. How to pass 2 parameters in <code>doInBackground</code> asynctask? Did I do something wrong ? </p>