By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
426,060 Members | 1,906 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 426,060 IT Pros & Developers. It's quick & easy.

reload a page after execution of a mysql-query in php

P: n/a
Hi all!

I am aware that this question might involve Javascript and MySQL. So
far I havenīt found a suitable solution in JavaScript ngīs - maybe
becauese php-programmers are more likely to come across the following

A script on my page relays a quite complicated query to a MySQL-server
with mysql_query(...); The query works fine but takes very long - I
usually have to wait for approx. 30 seconds before the query is
returned from MySQL and the results displayed by php on a webpage.

Iīd rather have the results of the query written into a nice textfile
and display a text like "Results are being retrieved" in stead of the
actual results and have the page reloaded a f t e r the textfile has
been updated. The newly loaded page then would obviously first check
whether this very textfile has been updated or not and read out its
contents in case it is has been updated less then letīs say two
minutes ago.

I hope I can make myself understood...:)

My question is: what actual code (I am almost sure it must be
JavaScript and not PHP) does PHP have to generate in order for the page
to reload after the results are retrieved and stored in the textfile?
Thank you in advance for hints, Nao

Jul 17 '05 #1
Share this Question
Share on Google+
1 Reply

P: n/a
Javascript Redirects:

there are others, pick one and go with it.

Might i suggest a pop-up warning the user of the slow process?
But anyways, if you just put the
$place = "page_after.php"; // replace, duh.
echo "<script>self.location='".$place."';</script>\n";
after the other code, it should redirect.

Jul 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.