Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7900253
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T08:55:24+00:00 2026-06-03T08:55:24+00:00

I have searched for some answers but I cannot find anything. So how do

  • 0

I have searched for some answers but I cannot find anything. So how do you use PHP to receive and save the data sent to it using POST from an android app. I am currently using the following code so what PHP would I use to store the data. Any link on tutorials for this would also be helpful.

public void send(View v)
 {
    // get the message from the message text box
    String msg = msgTextField.getText().toString();  

    // make sure the fields are not empty
    if (msg.length()>0)
    {
        HttpClient httpclient = new DefaultHttpClient();
        HttpPost httppost = new HttpPost("http://kiwigaming.beastnode.net/upload.php");
     try {
       List<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>(2);
       nameValuePairs.add(new BasicNameValuePair("Date", "Unitnumber"));
       nameValuePairs.add(new BasicNameValuePair("Doneornot", msg));
       httppost.setEntity(new UrlEncodedFormEntity(nameValuePairs));
       httpclient.execute(httppost);
       msgTextField.setText(""); // clear text box
     } catch (ClientProtocolException e) {
         // TODO Auto-generated catch block
     } catch (IOException e) {
         // TODO Auto-generated catch block
     }

    }
    else
    {
        // display message if text fields are empty
        Toast.makeText(getBaseContext(),"All field are required",Toast.LENGTH_SHORT).show();
    }

}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T08:55:26+00:00Added an answer on June 3, 2026 at 8:55 am

    The superglobal $_POST contains the post data.

    <?php
         print_r($_POST);
    ?>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have searched for a general solution to this but only find answers to
I have searched and found some info on this topic but the answers are
Good day I have some questions, I have searched around but the answers I
I've searched google and cannot find any answers to the particular problem. I have
I have searched all morning and yesterday afternoon and still cannot find an solution
I have searched a lot but not able to find particular solution. There are
i'm working on a project and i have some problems.I have searched but can
I have searched through google and SO for possible answers to this question, but
I've searched other answers but come to no success on doing this. I have
I've searched around for answers to this question, but not found anything quite on

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.