For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub
- This topic has 3 replies, 2 voices, and was last updated 11 years, 11 months ago by
Code_A.
-
AuthorPosts
-
richardjmanningParticipantHello.
I am reasonably new to mobile programming, and I am having some problems finding a tutorial which is easy to follow.
I need to be able to read and wright to and from a database so for example the database would look like this
Email # username # password # job
#####################################
mailto:example@12.com # example1 # example # job1
mailto:example@12.com # example1 # example # job2
mailto:example@12.com # example1 # example # job3
mailto:example2@12.com # example2 # example # job1
mailto:example2@12.com # example2 # example # job2I need a page which lists all jobs for the email “example@12.com”
Then when they press job1 for example their are two labels their that diaply their username and password.I need them to also be able to add an account ass well so that would be a simple form to make
Email textbox
username textbox
Password Textbox
Job textbox
And then an update button that would add it to the databaseNow for the hard bit all this needs to be done via javascript and it a sql database hosting with myphpAdmin
I know this is not the proper way of doing it but its the way it HAS to be done for the application I am makingThank you for any help.
Richard manningApril 21, 2014 at 4:42 pm #348911
Code_AMemberAll of this is possible within M1. Here is the general overview of how I establish communication between my app and a server-side database.
One the server side…
Create your mySQL DB on your web server. Then develop a web service interface to access the DB. This consists of PHP code to handle the database operations such as Select, Insert, etc. (I use the Code Igniter as my PHP framework), and also a REST controller to transfer the data back to the app in a organized format (xml, json,etc.)On the client (app) side…
You can use AJAX to call the PHP functions on your web server to send and receive data between your app and server. If you are using passwords for authentication, then I would suggest using an encryption algorithm to encrypt the data before sending back and forth across the web.April 23, 2014 at 8:37 am #348962
richardjmanningParticipantthank you for your reply but I relized this part from other posts on the topic from the forums but I am unable to find a good tutorial to
follow that is specific to mobi one and this is the first time I have ever done anything like this as usually I devlope in VBA or C#So my request was more for someone to link me to a GOOD step by step tutorial on how to achive this please.
Thank you
April 23, 2014 at 6:32 pm #348974
Code_AMemberOnce you get your server side DB and interface setup, here is an example from tguneysu of how to use AJAX within M1 to communicate with your server DB [viewtopic.php?f=19&t=6667]. I used this example to get my app connected to my web service.
Have you looked at the Websql CRUD with Custom List Example? This may be helpful too, although it uses a local DB.
I am not sure you will find a complete step-by-step tutorial here that includes the server side setup too since M1 deals with the client-side only (although, I have not scoured these forums looking so I cannot confirm).
-
AuthorPosts
