Empty records in the application database

I have a question for experts from databases and communication with them via php script. I have such a problem that through a simple script for sending posts to the database, the script is only used to send posts using the application, and bots send empty queries to the database, which means that empty records are saved. This creates a clutter in the database. I have to manually edit everything later, because I care about assigning autoincrement to posts. My question is: Is it possible to somehow protect against sending empty records? Or maybe I can implement a php script to the app's assets, but I don't know if the database login details will remain safe when I add such a script to assets (because everyone will be able to get them from the app?)? Or maybe I can add the script to assets but leave the login details on the database in a separate file on server, something like 'connetction.php' but I don't know if an external script can use it then? I will just add that it has the ability to connect to the database from the outside.

And this is my simple php script:
add.php.txt (920 bajtów)

Include a test in your blocks for empty values (the ones that would be sent). If empty then either do nothing or notify the user that they have empty values.

I already have a test like this.
Rather, the problem lies with the bots that search servers to take over valuable data from databases. By recognizing the script, they send empty queries via an appropriately constructed address. In this way, the application itself sends data to the database. (e.g. 'http://www.adress.com/add.php?name=Alan&city=DC&post=Hello!' The bot just asks for the address' http://www.adress.com/add.php? name = 'and an empty record already appears in the database).
Is there any way to solve this problem?

This doesn't sound like an AppInventor issue...

Because it's not. I asked in the first sentence about database and php specialists. Maybe I should ask elsewhere?

Yes, maybe.....

define your table correctly and use NOT NULL

Taifun