Please Wait ....upload is running.....

Hello I got a long series of mySQL insert queries and when the program starts the page remains clear until the end of application.
I would like to show , in some way, a gif image as suggested here down.
How can insert this html code into a blank application ?
Where is better to locate the animated gif file and the sintax to retrieve it correctly ?

<div id=“loading” style=“display:none;”> Loading Please Wait… <img src=“ajax-loader.gif” alt=“Loading” /> </div>

thanks