Solved

Refresh Page

Posted on 2004-08-05
3
1,074 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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Introduction Many web sites contain image galleries; a common design for these galleries includes a page with a collection of thumbnail images.  You can click on each of the thumbnail images to see the larger version of the image.  This is easily i…
Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

746 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

12 Experts available now in Live!

Get 1:1 Help Now