You can use a frameset of 100%,0 with 2 pages.
The first contains the "Wait until I'm ready" message, the second does the SQL&PHP work and, once the second page is loaded, you call a Javascript function that hides the first frame and shows the second one.
There are other ways for doing so, but that's what I do 🙂
Note:
This is the Javascript function:
var x=true;
var padre = parent.document.getElementsByTagName("frameset")[0];
function cambio() {
if (x) {padre.rows = "0,*";}
else {padre.rows = "*,0";}
}