I've read the docs @ php.net re: header (). I've even read through several threads on the subject. Yet my brain still doesn't comprehend.
Please help me rewrite this code so that I may understand!
<?php
header ("Location: test.php?page=1");
// info for test.php?page=1
print ("<p>you are now viewing page 1</p>");
print ("<p><a href=\"test.php\">back to test.php</a></p>");
exit;
header ("Location: test.php?page=2");
// info for test.php?page=2
print ("<p>you are now viewing page 2</p>");
print ("<p><a href=\"test.php\">back to test.php</a></p>");
exit;
header ("Location: test.php?page=3");
// info for test.php?page=3
print ("<p>you are now viewing page 3</p>");
print ("<p><a href=\"test.php\">back to test.php</a></p>");
exit;
// info for test.php
print ("<h3>you are viewing test.php</h3>");
print ("<p><a href=\"test.php?page=1\">visit test page 1</a></p>");
print ("<p><a href=\"test.php?page=2\">visit test page 2</a></p>");
print ("<p><a href=\"test.php?page=3\">visit test page 3</a></p>");
?>