Solid Tip: PHP is limited to using a meta tag to actually ‘refresh’ a page. ‘Redirecting’ a page is another story.
Why refresh is the wrong word
It is usually more appropriate to use the term ‘redirect’ when talking about PHP. You can redirect a page, before any information has been sent out, by using PHP’s built-in
header() function. This is useful when processing forms (logging in a user) or checking that certain conditions are met (sending unauthorized users back to login page). The following example shows you how to redirect a page.
<?php header("location: http://solidlystated.com"); ?>
The header function is also used when you want to take advantage of the limited refresh capability of meta tags. You have probably seen this when a page tells you, “You will be redirected in X seconds, or you can click here.” You can also simply echo the HTML for the meta tag to accomplish the same thing.
<?php // this refreshes current page after 5 seconds. header( "refresh:5;" ); // OR send to a new URL like this header( "refresh:5; url=http://solidlystated.com" ); // OR simply echo the HTML meta tag echo '<meta http-equiv="refresh" content="5" />'; ?>