Question about programming with databases on the web

Hello AppStudio developers,

I work alone here in Germany and can’t really ask anyone about AppStudio directly.

Normal programming is no problem, because I’ve been programming in VB6, VB.NET, NS.BASIC, a bit of PHP - and now NSB Appstudio too - for decades.

However, I have no experience with programming over the web - perhaps using Ajax?

I can create my own MySQLi database on my server:

$mysqli = new mysqli($host_name, $user_name, $password, $database);

I want to write and read my MySQLi or MySQL database from Android and Windows.
It should also be possible over WiFi.

Unfortunately, I’ve never done either.

Does anyone have a simple example in AppStudio Basic or can someone (optimal auch direkt aus Deutschland) give me a helping hand?

Unfortunately, I can’t get the AppStudio examples to work either.

Thank you in advance for any help,
Paparazzi

Paparazzi,

Just a quick comment on my method…

I never read my MariaDB database using my web app (browser’s) javascript. I always make an Ajax call to my PHP script on my server.

For example, for a login field, I pass the user login credentials to my server using Ajax, and that calls my PHP script, which reads my database and returns to the webapp the word either success or failure. I then handle the response in JavaScript accordingly.

I always obfuscate my Javascript (it doesn’t help if someone is really interested in what I wrote). I used to encrypt my PHP script, but I don’t find it necessary these days. I just obfuscate it as well.

Rodney

Hello Rodney,
yes, I would like that too.

My PHP scripts are also on my server.

Do I have to install something there as a ‘receiving point’ for Ajax?

Unfortunately I’m a newbie and don’t have a real contact person here.

Perhaps you can send me a few lines that I can then expand on.

For example: call Ajax (registration database: host_name, user_name, password, database)

and then in PHP as normal as before?

$mysqli = new mysqli($host_name, $user_name, $password, $database);

At the moment I output my data as a .CSV:

foreach ($result as $fields) {

fputcsv($data, $fields,‘;’);

But it’s all still in the test phase.

Greetings from Germany,
Paparazzi