Re: querystrings passed in header("Location: n") ?

From: Date: Wed, 13 Feb 2002 15:34:07 +0000
Subject: Re: querystrings passed in header("Location: n") ?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-84587@lists.php.net to get a copy of this message
On Wednesday, February 13, 2002, at 09:53 AM, Rick Emery wrote:
try: header("Location: domain.com/errorpage.php?errorcode=".urlencode($errorcode));
I tried that, and it didn't work. But it does raise a question, which I'll ask in a minute. I also tried doing $errorcode = basename($_SERVER['PHP_SELF']); $errorcode = urlencode($errorcode); header("Location: http://domain.com/errorpage.php?errorcode=$errorcode"); Which also didn't work. My question is unrelated to my problem, simply for my own edification: Can you break out of a quoted string and use the dot to concatenate a variable in the way that you did in your example? I didn't know that was allowed -- I suppose the "header()" function is simply taking a string as an argument ("Location: n"), but can we do this kind of string manipulation within a function's arguments? I'm not trying to question you, only to tie up a loose end. Back to the subject at hand, I am sorry to report that header() is not passing along the querystring. Erik ---- Erik Price Web Developer Temp Media Lab, H.H. Brown pricee@hhbrown.com

« previous php.general (#84587) next »