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

  • Home
  • SEARCH
  • 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 9004189
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T00:50:46+00:00 2026-06-16T00:50:46+00:00

I have one database file whose name is menu.db and this file is located

  • 0

I have one database file whose name is menu.db and this file is located at server now i want to read data from this database.
i also have registration page on the application i am working on, as user press submit button then all the user information should be store on that database at server.
if anyone solved this problem then please help me.

if any one knows then please help me.

  • 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-16T00:50:48+00:00Added an answer on June 16, 2026 at 12:50 am

    I have the following code. It authenticates the user password. you should call this method inside doBackground() of AsyncTask extended Class.

    public boolean authenticate(String strUsername, String strPassword)
    {
        boolean bReturn = false;
    
        InputStream pInputStream = null;
        ArrayList<NameValuePair> pNameValuePairs = new ArrayList<NameValuePair>();
        pNameValuePairs.add(new BasicNameValuePair("userid", strUsername));
        pNameValuePairs.add(new BasicNameValuePair("password", strPassword));
    
        try
        {
            HttpClient pHttpClient = new DefaultHttpClient();
    
            String strURL = p_strServerIP + "Login.php";
            HttpPost pHttpPost = new HttpPost(strURL);
            pHttpPost.setEntity(new UrlEncodedFormEntity(pNameValuePairs));
    
            HttpResponse pHttpResponse = pHttpClient.execute(pHttpPost);
            HttpEntity pHttpEntity = pHttpResponse.getEntity();
            pInputStream = pHttpEntity.getContent();
    
            BufferedReader pBufferedReader = new BufferedReader(new InputStreamReader(pInputStream,"iso-8859-1"),8);
    
            StringBuilder pStringBuilder = new StringBuilder();
            String strLine = pBufferedReader.readLine();
            pInputStream.close();
            if(strLine != null)
            {
                if((strLine).equals("permit"))
                {
                    bReturn = true;
                }
            }
        }
        catch (Exception e) 
        {
            Log.e("log_tag", "Caught Exception @ authenticate(String strUsername, String strPassword):" + e.toString());
        }
    
        return bReturn;
    }
    

    The class you extend from AsyncTask should be something like

    class ConnectionTask extends AsyncTask<String, Void, Boolean> 
    {
        private SharedPreferences mSettings;
        private Context mContext;
        ConnectionTask(SharedPreferences settings, Context context)
        {
            mSettings = settings;
            mContext = context;
        }
    
        protected void onProgressUpdate(Integer... progress) 
        {
        }
    
        protected void onPostExecute(Boolean result) 
        {
            Toast.makeText(mContext, "Authentication over.", Toast.LENGTH_LONG).show();
        }
    
        @Override
        protected Boolean doInBackground(String... params) 
        {
            pVerifier.authenticate(params[0], params[1]);
            return true;
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to create a 'mini-database'. I want to have one file with lots
I have one SQL server database which was created using Import/Export Wizard from an
Basically, I have a Sql Server database whose schema changes. When this happens, I
i have one php file which process adding of record in Database fro array.
I have one database whose size is growing very fast. Curruntly its size is
I have one large database table of request data, much like Apache request logs,
I have one field in Database ( Sql Server DB 2000) with varchar field
I have a small database which is legacy from an almost defunct project. This
I have a php script whose name is XYZ.php. When I load that file
I have a production server running, and a local development one (this one uses

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.