Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You are using httppost but appending your data name and pass into the url itself. Use AsyncTask with List as follows:</p> <pre><code>private class MyAsyncTask extends AsyncTask&lt;String, Integer, Double&gt; { @Override protected Double doInBackground(String... params) { // TODO Auto-generated method stub postData(name1, email1, password1, mobile1); return null; } protected void onPostExecute(Double result) { pb.setVisibility(View.GONE); Toast.makeText(getApplicationContext(), "Account Activated Login To MyGenie", Toast.LENGTH_LONG).show(); Intent intent = new Intent(RegisterActivity.this, LoginActivity.class); startActivity(intent); } protected void onProgressUpdate(Integer... progress) { pb.setProgress(progress[0]); } public void postData(String name, String email, String password, String mobile) { // Create a new HttpClient and Post Header HttpClient httpclient = new DefaultHttpClient(); HttpPost httppost = new HttpPost( "http://yoursite.php"); try { // Add your data List&lt;NameValuePair&gt; nameValuePairs = new ArrayList&lt;NameValuePair&gt;(); nameValuePairs.add(new BasicNameValuePair("name", name)); nameValuePairs.add(new BasicNameValuePair("email", email)); nameValuePairs .add(new BasicNameValuePair("password", password)); nameValuePairs.add(new BasicNameValuePair("mobile", mobile)); httppost.setEntity(new UrlEncodedFormEntity(nameValuePairs)); // Execute HTTP Post Request HttpResponse response = httpclient.execute(httppost); } catch (ClientProtocolException e) { // TODO Auto-generated catch block } catch (IOException e) { // TODO Auto-generated catch block } } } </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload