On Wednesday, February 13, 2002, at 03:57  PM, Lars Torben Wilson wrote:

> 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.

One of these days I'm going to lock myself in a cabin out in the woods 
somewhere with a printout of all of the important RFCs and specs like 
CSS and XML1.0 and HTTP1.1 etc, and not let myself out until I've 
absorbed it.  Until then, thank you for letting me know that this was in 
fact legal.

> Did you try print_r($_REQUEST); in the receiving script?

I hadn't, but I just did.  It printed out the word "Array", followed by 
two index/value pairs within parens.  The first pair was the name and 
value of a cookie I am using in this site, the second was the name and 
value of the cookie used by the session ID.  It did not print out the 
GET name/value pair from the querystring, which means that while the 
header() function works for redirecting the browser to a new page, it 
does not recognize the querystring.

After some debugging, I found out that I had made a mistake all along.  
A previous include file was sending me to the very same page that I was 
currently trying to have header() send me to, only with no querystring, 
and I was thinking this was the effect of the querystringed header() 
even though in reality it was the former.  So my bad.  Thanks to all who 
tried to help me debug this situation.

>> 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:
> Hope this helps,

It definitely cleared up quite a bit about how function arguments are 
interpreted.  Thank you.



Erik Price
Web Developer Temp
Media Lab, H.H. Brown

PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to