remote database update

Posted on 2010-01-04
Last Modified: 2013-12-13
I have created a website that uses php and an SQL Express database to collect some information that I'm entering into my blackberry.  It's simple, but working fine.  I would like to create a javaME program for my blackberry that will handle the collection and uploading of the data without taking the extra steps of going into the web browser and logging into my website through a SSL connection.

I've created a few stand alone java apps for my blackberry already, so I'm already comfortable with the javaME and blackberry interface programming.  I'm also familiar enough with php and html to make a website that can do what I want.  What I'm having trouble figuring out is how to write a program that will handle the details of connecting to my website and transferring the info once it's collected.

Here is what I assume needs to happen.
1. Program opens and I fill out the form that consists of text boxes, check boxes, and drop down lists.
2. I hit send the send button
3. The program creates an XML file
4. The program uses my user name,  password,  and SSL certificate to connect to the website
5. The program sends the xml file over the wireless network
6. The website sends some kind of response indicating that the XML file has been received and processed
7. The program lets me know that all is good.  

I can already do steps 1, 2, 3, and 7; its 3, 4, 5, and 6 that have me stumped.  I probably just lack the necessary vocabulary to find a tutorial for something like this.

Question by:KMDComp
    1 Comment
    LVL 32

    Accepted Solution

    If you want simple, I would do the following:

    1. Program opens and I fill out the form that consists of text boxes, check boxes, and drop down lists.
    2. I hit send the send button
    3. The program creates an XML file
    4. The XML file contains my username and password.
    5. I use a POST function to send it to a php script. (using https of course).
    6. The php script reads the xml file, and authenticates the username and password before acting on data.
    7. Once authenticated, the data is acted upon and a response is generated on the page.
    8. The Java program on your handheld can interpret the php output.

    Featured Post

    Maximize Your Threat Intelligence Reporting

    Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

    Join & Write a Comment

    Introduction This article explores the design of a cache system that can improve the performance of a web site or web application.  The assumption is that the web site has many more “read” operations than “write” operations (this is commonly the ca…
    Let me explain this picture a little bit.  First, in case you haven't already guessed, you are looking at my 2 phones, an Android Samsung Galaxy S5 on the left and an iPhone 5 on the right.  They are on their respective cradles on my desk.  But, you…
    The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
    The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now