Reload the current page

  header('Location: '.$_SERVER['PHP_SELF']);
  die;

Form reloads current page

<form action="<?php $_SERVER['PHP_SELF'];?>" method="POST">

Link reloads current page

<a href="<?php $_SERVER['PHP_SELF'];?>">Refresh</a>

Reload current page but with post values stripped

  unset($_POST);
  header('Location: '.$_SERVER['PHP_SELF']);
  die;

Using javascript

	//Cause the page to reload from PHP
	echo "<script type=\"text/JavaScript\">
				<!--
				window.location.reload()
				-->
				</script>";
href="javascript:window.location.reload();"

Periodic Refresh

<meta http-equiv="refresh" content="5" /> <!-- Cause page to reload every # seconds -->
Feel free to comment if you can add help to this page or point out issues and solutions you have found. I do not provide support on this site, if you need help with a problem head over to stack overflow.

Comments

Your email address will not be published. Required fields are marked *