I am developing Smoking counter and I need to send all the smoking record (about the time user smoking) to database on the server. The server database is MySQL database. I knew that I must have send data to PHP page/script, and this page/script will run on the data to insert record to database.
I would like to know: is there another way to update database, because I don’t have knowledge about PHP. I used to work on java and c/c++/objective-c. If you know another way to do this task, please let me know.
Any help would be appreciated.
If you already know Java, C and C++, then you should be able to learn how to write your php script really quickly, just google a tutorial.
While could run a Java server using a servlet to insert the data, PHP is far easier to deploy, and you should only need to write a few lines of code.
I you do use PHP though one thing to remember when inserting to your database is to run all your parameters to add through mysql_real_escape_string
Edit:
To give an example, this script when configured would insert a name and location to a database: