RE: [PHP] Re: & in Query String

From: Date: Tue, 26 Nov 2002 23:00:08 +0000
Subject: RE: [PHP] Re: & in Query String
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-126198@lists.php.net to get a copy of this message
Ok ... I take back what I said about &amp; not working in a query string. It works just fine. But, none of this explains why I am sometimes receiving a request with &amp; in the query string, especially I am using '&' in the <A> link. The only way I think I can find out is by augmenting the error message I received, as described earlier. I'll report back when/if I learn anything from doing this. -- JR > -----Original Message----- > From: Ernest E Vogelsinger [mailto:ernest@vogelsinger.at] > Sent: Tuesday, November 26, 2002 12:15 PM > To: Erwin > Cc: php-general@lists.php.net > Subject: Re: [PHP] Re: &amp; in Query String > > > At 16:54 26.11.2002, Erwin spoke out and said: > --------------------[snip]-------------------- > >> Actually, you should specify the URL with the &amp; > >> yourself, like this: > >> > >> <a HREF="show_pic.php?pic=blah&amp;caption=Some+Text"> > > > >Of course not...this is a HREF tag, which can use & instead of > &amp;. &amp; > >is for displaying purposes only, not for URL's. > > Nope. As I just learnt from this list it _is_ valid to specify a query > string using &amp; as delimiter - it will be resolved by the browser the > same way as it is when it gets displayed. > > Actually this is the only way to create W3C-compliant query strings. > > Just check with the W3C HTML Validator: > http://validator.w3.org/ > > > -- > >O Ernest E. Vogelsinger > (\) ICQ #13394035 > ^ http://www.vogelsinger.at/ >

« previous php.general (#126198) next »