I have a script that writes 100,000 values to a database in about 90 seconds. At the top of the script I have>:
echo "<br />Adding 100,000 records to database . . .";
Then I go into the loop that writes the data, and at below the loop I have
echo "<br /><br />DONE. Id of last record inserted is $Id";
I expected to see the first echo when I started the script (I start it by entering its URL in the browser address bar) and then see the second echo when the script completes. Ideally I'd also like to see some kind of progress indicator during the 90 seconds. But instead I just see a "Connecting" note in the browser tab for the script, with a circling electron icon at the left for 90 seconds. At the lower left of my screen I see a note "Transferring data from [mysite]" for the 90 seconds. When the script completes I suddenly see both the echoes above.
Does anyone know how I can see something from the script while it's running, and ideally a progress bar of some kind?
Thanks for any ideas.