Page 1 of 1
Wait 3 seconds after click
Posted: Sun Apr 09, 2006 5:59 pm
by SuperX
How do I let a user click on link and wait for like 3 seconds to run php code on same page?
Posted: Sun Apr 09, 2006 6:06 pm
by feyd
Do you want it to wait on the page or make the request to look like it's taking three seconds? The former is Javascript (setTimeout) the latter is
sleep()
Posted: Sun Apr 09, 2006 7:08 pm
by SuperX
Ah, that what I am looking for! Thanks!

I test it out and it work, but not what I thought what I need. I was try to do same thing like at Megaupload.com... for example, when user wait for timer finish and click on link and it popunder then wait like 3 seconds then it run php page. I think it have to do before php page run. Maybe html, css, or something.
Posted: Sun Apr 09, 2006 7:55 pm
by LiveFree
Code: Select all
<?php
// Code goes here
if (sleep(3)){
include('download.php');
}
?>