On Wed, 2002-02-13 at 07:34, Erik Price wrote: > > On Wednesday, February 13, 2002, at 09:53 AM, Rick Emery wrote: > > > try: > > header("Location: > > domain.com/errorpage.php?errorcode=".urlencode($errorcode));
First to the original question: yes, querys are allowed in Location headers, according to RFC 2616 (HTTP 1.1) and RFC 2396 (URI Generic Syntax). And, they've always worked for me, so your problem must be elsewhere. Did you try print_r($_REQUEST); in the receiving script? > 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. Yup, totally. Function call syntax list is like this: <function-name>(<expr1>[, <expr2>][, . . .]) { <statement block> } Any argument may be an expression. If that expression evaluates to the type which that function is expecting for that argument, so much the better. :) Just remember that the argument expressions are always evaluated *first*, and the resulting values are then passed to the function. Hope this helps, Torben > 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 > [EMAIL PROTECTED] -- Torben Wilson <[EMAIL PROTECTED]> http://www.thebuttlesschaps.com http://www.hybrid17.com http://www.inflatableeye.com +1.604.709.0506 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php