Toggle Between Web Pages after a given time - Possible?

Hi All,

Well this is my first time here on this forum and was hoping some of you will be able to help me. Well, I was wondering that if it’s possible to use php to toggle between multiple webpages after a certain given time. For example, let’s say I have the following webpages,

[ul][li]firstPage.html[/li]
[li]secondPage.html[/li]
[li]thirdPage.html[/li][/ul]

With the above pages available, if I’m required to toggle between them after, let’s say 5 seconds, can I do it? Please do help me as I’m really stuck at this problem and was hoping php might be able to solve this problem. Looking forward to hearing from you all. Thanks in advance for any help or replies.

Take Care all … :slight_smile:

it sounds more like a program to be run with jquery or javascript rather than php, since php is server side

I have a function that returns a user to a page after an unsuccessful form submission.

function died($error) {
echo "Sorry, but there was an error(s) found with the form you submitted. ";
echo $error;
echo "<meta http-equiv=refresh content=\"5; URL=contact/contact.php\">";
die()

The ‘5’ in the meta redirect being the time delay. Maybe something like this will work for you?

Yes, both of your replies are correct!

If done in PHP, you would have to echo a header to the browser that tells the current page to change after your 5 seconds. Or, you can use a Javascript function the runs ONLOAD and waits 5 seconds and then changes the “location” of the page. Either will work.

For the first version, I use PHP to echo this line in the headers of the page:

This example wait 10 seconds, 5 was always too short for me! and the domain can be any page...
Sponsor our Newsletter | Privacy Policy | Terms of Service