hi,
2 days ago i touched for the first time MySql. I had no clue where to start. it was a very new topic for me. But thanx to this great community i have after 2 days a working example of MySql+PHP
First i would like to thanx to @KMatle, @sorex, @DonManfred, @Lahksman and ofcourse @Erel
So what does this app do?
it has 2 Screens:
* Registration screen
* MySql Screen
In the registration screen you can login with your username and password that you create in this app (not your b4x details). After Signing Up you will be able to login.
There is a b4login.php file that add your details to a db and ask for it when you try to login.
in the MySql Screen you have 5 buttons and a listview
you can Count Entries, Get all Entries, Update an Entry, Insert a new Entry, Delete an Entry
the mysql db table has 6 columns (id,name,adress,email.phone,vip)
The app sends a HttpJob to b4ascript.php and from there to MySql.
i am not using any libs except the jCore, jFX (that are defaults) and jHttpUtils2
i created a code module where all incoming data are converted to strings.
i assume that most of you allready know mysql+php very well but for me it was a very new topic so maybe this example could help also to other newbies like me
(Note that you can use this code also in b4a and b4i !!)
you have 3 php files:
Login, Get/Edit/Add/Delete from db and a mydetails php
you only need to change the password, db, username and host in mydetails.php and upload all 3 php's to your host.
i don't include those informations in my other php's because @KMatle explained to me how importent it is not to include them in those php's. (it would not be safe enough)
Have fun
2 days ago i touched for the first time MySql. I had no clue where to start. it was a very new topic for me. But thanx to this great community i have after 2 days a working example of MySql+PHP
First i would like to thanx to @KMatle, @sorex, @DonManfred, @Lahksman and ofcourse @Erel
So what does this app do?
it has 2 Screens:
* Registration screen
* MySql Screen
In the registration screen you can login with your username and password that you create in this app (not your b4x details). After Signing Up you will be able to login.
There is a b4login.php file that add your details to a db and ask for it when you try to login.
in the MySql Screen you have 5 buttons and a listview
you can Count Entries, Get all Entries, Update an Entry, Insert a new Entry, Delete an Entry
the mysql db table has 6 columns (id,name,adress,email.phone,vip)
The app sends a HttpJob to b4ascript.php and from there to MySql.
i am not using any libs except the jCore, jFX (that are defaults) and jHttpUtils2
i created a code module where all incoming data are converted to strings.
i assume that most of you allready know mysql+php very well but for me it was a very new topic so maybe this example could help also to other newbies like me
(Note that you can use this code also in b4a and b4i !!)
you have 3 php files:
Login, Get/Edit/Add/Delete from db and a mydetails php
you only need to change the password, db, username and host in mydetails.php and upload all 3 php's to your host.
i don't include those informations in my other php's because @KMatle explained to me how importent it is not to include them in those php's. (it would not be safe enough)
Have fun