Android Example Dynamic creating of views "retrieved" from a database (php + MySql)

If you are lazy creating views "by hand" or you simply want a "form" depending on a MySql table take a look at this small app.

Type in the Database and Table Name and the IP-Address of the server your MySQL + php is running. It uses httputils2 to get the table culumns and definitions. With that it generates a label with the culumn name and an edittext with the definition (f.e. int, carchar(xx), etc.). Both views are added to a scrollview.

See my other tutorial to set up an own Webserver in a few minutes: https://www.b4x.com/android/forum/t...-local-php-mysql-server-xampp-with-b4a.48635/

Included is the app and the php file.

Please notice *NOT* to place the login informations inside the php script (include it from another). This example uses the login parmeters Xampp comes with.
 

Attachments

  • GetCol.zip
    479 bytes · Views: 1,387
  • MySqlViews.zip
    7 KB · Views: 1,520
Top