I have two pages x.php and y.php, I am redirecting the page x.php to y.php. I am redirecting the page by form post method.

y.php is pulling some more data from mysql database and it is taking 3 to 4 seconds to load that page, I need to show progress bar (loading image) while page loads.

This is what, I am doing,

a html page is submitting to remote server x.PHP page and x.PHP page is pulling data from mysql database and based on the type of data it redirects to y.PHP, this redirection is done by automatic form submit using Javascript.

I need to show loading image on both html to x.php and x.php to y.php.

I tried with echoing image tag on top of x.PHP page, it is working in Mozilla and not an other browsers.

How can I achieve this; can anyone help me?