Reply to Re: Problems with $_GET

Your name:

Reply:


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

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация