Redirecting to same page
Posted: Fri Nov 29, 2002 11:29 am
Hi..
I am trying to redirect to the same page with an additional querystring from an include file. Here is the code
which is working fine. But, if I replace "template1.php" with $_SERVER["PHP_SELF"], it is just hanging on the same page until the script is timed out.
Looks like it is getting into an infinite loop. In that case, I would expect the first code also to fail, if I run the code from "template1.php". But, it is not. Any ideas..?
I am trying to redirect to the same page with an additional querystring from an include file. Here is the code
Code: Select all
$location = "template1.php?pageid=". $_GETї"pageid"]. "&errnum=1";
header ("Location:". $location);Code: Select all
$location = $_SERVERї"PHP_SELF"]."?pageid=". $_GETї"pageid"]. "&errnum=1";
header ("Location:".$location);