Re: & in Query String
| From: | Marek Kilimajer | Date: | Tue, 26 Nov 2002 10:01:01 +0000 |
| Subject: | Re: & in Query String | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-126065@lists.php.net to get a copy of this message | ||
Get mailed also $_SERVER['HTTP_USER_AGENT'], I would like to see which browser does that.
& should get translated to &, but not vice versa
Jonathan Rosenberg wrote:
I have a page with thumbnail pictures that can be clicked on to see a larger picture. Each picture is hyperlinked as follows <a HREF="show_pic.php?pic=blah&caption=Some+Text"> I access the 'pic' & 'caption' attributes with $_GET['pic'], etc. Pretty standard stuff. I have PHP set up so that error messages get mailed to a specified mail account. Every so often I get the following error message: Undefined index: caption In file /home/..../show_pic.php, line 64 page: /show_pic.php?pic=gb3.jpg&caption=Some+Text The problem is obviously (I think) that the $_GET['caption'] is failing. What I can't figure out is why the '&' got turned into '&'. Is a browser doing this? -- Jonathan Rosenberg Tabby (RB), Lynx (RB), Licorice, Tigger, Jet, Belle http://www.tabbysplace.org/