I ended up finding a great solution at the PHP Garage. It was a combination of HTML, one line of PHP, and a single line of JavaScript.
<?PHP
// Insert all your beginning code, Header, Includes, etc.
// Insert all your form validation code here
// Now we're getting ready to run the query so put up the Please Wait message
// I used a table and animated gif
echo '
<div name="wait" id="wait" style="visibility: block">';
// The key is this div tag. After the processing is over, we will make this div tag invisible
// So everything between the div tags will be my Please Wait message
echo '
<br /><br /><br /><br /><br /><br /><br /><br /><br />
<table width="440" cellpadding="0" cellspacing="2" border="0" bordercolor="#003366" bgcolor="FFFFCC" class="octext-search" >
<tr>
<td> </td>
<td align="center">Please wait...</td>
<td> </td>
</tr>
<tr>
<td> </td>';
// I use an animated gif to give the sense of something happening
echo '
<td align="center"><img src="images/animated_gif.gif" width="32" height="32" /></td>
<td> </td>
</tr>
<tr>
<td> </td>
<td align="center">We are retrieving the information you requested.</td>
<td> </td>
</tr>
<tr>
<td> </td>
<td></td>
<td> </td>
</tr>
</table>
</div>';
// Then to send the page as so far rendered to the browser:
flush();
$conn = db_connect();
$result = $conn->query($query);
if (!(DB::isError($result)))
{
// Query is finished to do away with the Please Wait message
?><script type="text/javascript"> document.getElementById('wait').style.display="none"; </script> <?php
// Go ahead and output your query results!
}
include $footer_url;
?>
Hope this helps!
Terry