You can not do it.
Unfortunately.
The PHP is as stateless as HTML.
But you might be able to do it with a JS redirect page. and I persume that the page will hang until the other page is ready to be displayed.
It means that you first show the redirect page, and then redirect immediately to the PHP script page, and while the PHP script is processing the data, the viewer will not be confused.
I hope that it can help.
André wrote:
I've a long php treatment and I'd like to display a message for user that the code is loading.
When the treatment has reached the end, i'd like to clear this message and display the result.
How do I clear the screen ?