Here is an example of uploading Json Data to a MySQL database on a website/Server from a Android phone. This is great to upload user data from the phone to a website. The bad thing is that you have to use a different Thread instead of the main UI thread. It fairly simple to multithread even though some examples makes it pretty complicated. Check out my attempted to explain an example of using the Android Thread class.
Tag Archives: MySQL
I created this form on my graveyard site so users can share their own graveyard. It allows the user create a small profile of the grave yard and upload 5 images to the server. After filling out the form the data will be inserted into a MySQL table to be displayed later on the page they created. The page is created automatically, but I will show how that is done in a separate post. The images are uploaded to a server to be placed in unique folder to be easily displayed. From my past experience it is very important to prevent spam when creating HTML forms. I used Google’s Captcha to prevent the spam. It was very easy to setup and is very effective.
I have the files below that I created. They have examples of:
- Inserting HTML form data into a MySQL Table
- Inserting multiple images into a server using a form
- Using Google Captcha to prevent spam.
I will continue to add to the php and mysql examples. These are just some simple examples. Remember just put them in between php tags and place the code in a php file. All of them you will have to add your username, password, database and table name(except for view tables).
On a recent school project, we was making a website that had a social network element. After the user created his account and loged in, he could see his profile. This was useless because no one else could see it. I needed a way so that ever member had a unique URL. So I created a template that only information from the database to create the webpage. It is very simple to query a MySQL database using the URL.