Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Refresh Page

Posted on 2004-08-05
3
Medium Priority
?
1,139 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 500 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

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Question has a verified solution.

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

Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this. Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it i…
These days socially coordinated efforts have turned into a critical requirement for enterprises.
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
Suggested Courses

636 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