Before changing the database and attempting to write new data insertion code, I need to refresh my memory of what the Applet currently does.
So in the second of four statutory Applet methods,
public void start(), the Applet includes the following code:
Essentially the explicit purpose of the method is to return a string for display in the Applet, but the database connection code is written into the code of the method, and the string returned is either
connection succeeds or
connection fails, depending on the outcome.
Anyway sadly, it has to go, because under the new rules, the connection code has to be contained in a PHP file.
In the third statutory Applet method,
public void stop(), is the following code:
This is just a void method, I guess because if the Applet is closing, there is nowhere to display any returned message.
Then in the core of the Applet code is the following:
This is another diagnostic display function, with data insertion code written into it, and it is run every time an item is completed. This is the code, which needs to be modified carefully to send a query to PHP, without disrupting too badly the functionality of the Applet.