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 9047337
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T11:53:12+00:00 2026-06-16T11:53:12+00:00

I am new to android development, I developed an application on android which has

  • 0

I am new to android development, I developed an application on android which has 3 activities, beside this I have developed a PHP website having database on MySQL. I want to make connection between android and PHP. I read alot of tutorials and make connections according to that using JSON Parser but I doesn’t work. Can It is possible to connect client to server using “Web Services“? Now the requirement of my project is that I have a form of Customer Registration from which I want to get all the data that is entered by user and that is saved in database on android. How can I do it? Is it possible that in my android application I enter data in my other activities and it will save in MySql database. Kindly help because I have tried many ways to connect and getting data but didn’t succeed Kindly guide the possible way to retrieve Task details from my PHP application.

  • 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-16T11:53:13+00:00Added an answer on June 16, 2026 at 11:53 am

    Do like this.

    It might help to you.

    title = spinnerTitle.getSelectedItem().toString();
    firstName = editTextFirstName.getText().toString();
    lastName = editTextLastName.getText().toString();
    address1 = editTextAddress1.getText().toString();
    adddress2 = editTextAddress2.getText().toString();
    city = editTextCity.getText().toString();
    county = editTextCounty.getText().toString();
    postCode = editTextPostCode.getText().toString();
    country = spinnerCountry.getSelectedItem().toString();
    dayPhone = editTextDayPhone.getText().toString();
    evePhone = editTextEvePhone.getText().toString();
    
    String xml = "<?xml version=\"1.0\" encoding=\"utf-8\" ?>"
                + "<users><Title>"+title+"</Title>"
                + "<FirstName>"+firstName+"</FirstName>"
                + "<LastName>"+lastName+"</LastName>"
                + "<Address1>"+address1+"</Address1>"
                + "<Address2>"+adddress2+"</Address2>"
                + "<LoginID>"+userId+"</LoginID>"
                + "<Password>"+password+"</Password>"
                + "<County>"+county+"</County>"
                + "<City>"+city+"</City>"
                + "<Country>"+country+"</Country>"
                + "<PostCode>"+postCode+"</PostCode>"
                + "<Email>"+email+"</Email>"
                + "<DayPhone>"+dayPhone+"</DayPhone>"
                + "<EvePhone>"+evePhone+"</EvePhone>" + "</users>";
    
                serverCall(xml);
    
    
    private void serverCall(final String xml )
    {
    
     ConnectivityManager conMan = ( ConnectivityManager ) getSystemService( Context.CONNECTIVITY_SERVICE );
     if( conMan.getActiveNetworkInfo() != null && conMan.getActiveNetworkInfo().isConnected() )
      {
    
         result = new Connection().getResponse("http://localhost/registration.php" , xml);
         if(result.equals("yes") {
           //registration done
         } else {
           //failed
         }
       }
    }
    

    Connection.java

    public String getResponse(String connUrl, String xml) {
        DefaultHttpClient httpClient = null;
        try {
            MultipartEntity mp = new MultipartEntity(HttpMultipartMode.BROWSER_COMPATIBLE);
            HttpPost method = new HttpPost(connUrl);
            method.setEntity(mp);
            mp.addPart("xml_request", new StringBody(xml));
    
            httpClient = new DefaultHttpClient();
            HttpResponse response = httpClient.execute(method);
    
            if(response.getStatusLine().getStatusCode() == 200){
                ByteArrayOutputStream outstream = new ByteArrayOutputStream();
                response.getEntity().writeTo(outstream);
                return outstream.toString();
            }
        }
        catch(Exception e) {
            Log.v("APP", "Exception while create connection for getResponse from server with: " + e.getMessage());
        }
        finally {
            httpClient.getConnectionManager().shutdown();
        }
        return "";
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am new to android application development. I developed one android application, in this
I am new to android application development. I developed one login application. In this
I am new to android development. I have created a popup window which is
Possible Duplicate: Android SplashScreen I am new to android application development. I developed one
I am new in android development. and i have task to develop the application.
Hi there Im new to mobile application development. I had developed Android apps using
I'm new to android development and I've developed a small app but I'm facing
I am new to Android development. I have both Windows 7 and Mac OS
I am somewhat new to android development and development in general. I have a
I'm new in Android development and I have the next question/problem. I'm playing around

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.