is there a Wait x second function?
Posted: Mon Dec 04, 2006 4:28 pm
Im wondering if there is a wait(5.00) second function, so I can say, wait 5 seconds before redirecting
A community of PHP developers offering assistance, advice, discussion, and friendship.
http://forums.devnetwork.net/
Code: Select all
<?php
// Do what you need to do...
sleep(5);
header("Location: next.php");
Code: Select all
<?php
$message = 'We are redirecting you...';
echo $message;
sleep(5);
header('Location: http://www.somewhere.com');
?>Headers already sent on line XX
Code: Select all
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html dir="ltr" xml:lang="en" lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Please Wait...</title>
<meta http-equiv="Refresh" content="5; url=http://example.com/index.php" />
</head>
<body>
Wait 5secs or <a href="http://example.com/index.php" title="">click here</a>.
</body>
</html>
<Off topic>The Ninja Space Goat wrote:that's ok, not everah... but I keep thinking the same thing because of their similar avatars
What on Earth does this sort of thing have to do with AJAX?ok wrote:If you want to add a message you need to use HTML or AJAX.
Because Ajax is the solution for everything these days. It's the buzzword, man!onion2k wrote:What on Earth does this sort of thing have to do with AJAX?

LOLEverah wrote:<Off topic>The Ninja Space Goat wrote:that's ok, not everah... but I keep thinking the same thing because of their similar avatars
<--- My penguin is sooo much cooler... just look at him. All cute and fat and rotund and plump. Mmm, makes me want chicken.
</Off topic>