|
Posted by Tim Streater on 03/09/06 15:15
In article <baJPf.34670$x96.30736@fe02.news.easynews.com>,
Andy Jeffries <news@andyjeffries.co.uk> wrote:
> Tim Streater wrote:
> > I have a page which I enter thusly:
> >
> > http://my.domain/mypage.phtml?absid=123&cpage=somestring
> >
> > and inside mypage.phtml I do this:
> >
> > $absid = $_GET["absid"];
> >
> > Unfortunately, and I can't easily fix this in the short term, my
> > "somestring" may contain "absid=456".
>
> It shouldn't do, it should contain "absid%3D456" i.e. the = within the
> parameter should be urlencoded. If you're generating that url you
> should wrap the parameter in urlencode().
Thanks, this was the correct pointer. When I came to look at my code
again I remembered that most of this work was being done in JavaScript
but the principle is the same - I added an escape call and all is now
fine.
Thanks!
-- tim
Navigation:
[Reply to this message]
|