Solved

Refresh Page

Posted on 2004-08-05
3
1,085 Views
Last Modified: 2006-11-17
I have a page that displays messages.  I would like to make it refresh every 5 seconds.  How can I do this in php?
0
Comment
Question by:donb1
  • 2
3 Comments
 
LVL 33

Expert Comment

by:snoyes_jw
ID: 11731119
PHP is server side, so it's not the tool of choice for this.  You might try a meta refresh.
http://webdesign.about.com/cs/metatags/a/aa080300a.htm
0
 
LVL 27

Accepted Solution

by:
Diablo84 earned 125 total points
ID: 11731135
indeed, put this in your head tag

<meta http-equiv="refresh" content="5;URL=page.php">

substituting page.php for the page you want to refresh to

if you want to combine some php to make this easier for you and refresh the curent page do this

<meta http-equiv="refresh" content="5;URL=<?php echo $_SERVER['PHP_SELF']; ?>">
0
 
LVL 27

Expert Comment

by:Diablo84
ID: 11731140
just to clarify, by "in your head tag" i mean within the head tags
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Form not operating correctly. 1 23
unset shopping cart session 15 33
Update from TABLE-A to TABLE-B 5 39
php convert date format 3 0
Both Easy and Powerful How easy is PHP? http://lmgtfy.com?q=how+easy+is+php (http://lmgtfy.com?q=how+easy+is+php)  Very easy.  It has been described as "a programming language even my grandmother can use." How powerful is PHP?  http://en.wikiped…
This article discusses how to create an extensible mechanism for linked drop downs.
The viewer will learn how to count occurrences of each item in an array.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now