After much searching, and searches excluding terms such as "forum", (forum questions seem to dominate this topic in Google), I found an excellent page hosted by Virginia Tech. This is a really good single page tutorial, which takes the reader through all the basics of PHP, from
echo "Hello World!"; to a simple web application, which includes all the essential functions of adding data, displaying data, editing data and deleting records. Better still, for each task, it includes the PHP source code, produced HTML, and rendered HTML. There are no zip files to download, and certainly at first glance, no holes or gaps in the code.
Most importantly, for me, the tutorial makes explicitly clear the code required to stay on the same page while information is being posted from a form. So if information is entered on an ordinary HTML page (with a name and extension like myForm.htm) and is to be processed by a page called myCode.php, the opening form tag should look like this:
<form method="post" action="myCode.php">
But if the posting is to be handled on a form containing the processing code (which will need the extension .php - so it might be called something like myCodedForm.php), the opening form tag should look like this:
<form method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>">
Alternatively it might look like this:
<form method="post" action="myCodedForm.php">
My plan is to adapt the examples in this tutorial to the creation of a dummy application, which adds lines to my own database, and to describe my progress here. I shall skip the database creation steps, because that has already been described here. That was for a Derby database, but I also described connecting to a MySQL version with PHP here. I shall focus on the code used to add lines, to view the table contents, and to delete lines.