You are here: Re: urlencode and $_GET « PHP Programming Language « IT news, forums, messages
Re: urlencode and $_GET

Posted by Jerry Stuckle on 11/17/05 22:03

black francis wrote:
> again, it's the browser the one who 'encodes' the url, not you.
>
> try-n-see:
> <a href="example.php?var=one word"> turns into
> "example.php?var=one+word" in the address bar.
>
> what you should never use un a url is an ampersand (use &amp; instead
> of &), any other character is encoded by the browser.
>

Wrong.

The browser will convert a space to a + sign. The other characters need
to be encoded before being sent to the browser so they don't get
interpreted incorrectly.

Hence the urlencode() function. Read up on it in the PHP doc.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

 

Navigation:

[Reply to this 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

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