I have a PHP script which downloads email attachments on a daily basis from cron. I would like to create a HTML form which can be used to run this script and others manually when necessary.
As the script runs there is a loop which displays the number of emails that have been run through and then at the end echos that the script has finished running.
I would like to be able to make it so that once the button is pressed on the form, a window will display these output's so that the user knows once the script has finished running.
The simple form I have so far:
<form action="test.php" type="post">
<input type="submit" value="Download Attachments" />
</form>
Is it possible to achieve this? Right now the best way I can think of doing it is to redirect back to the form page after the script has finished running, but I would prefer it if everything could be on the same page so the user has a record of what scripts they have run, right in front of them.