You are here: Re: does PHP automatically run rawurldecode on any any URL to figure out what pass parameters to capture? « PHP Programming Language « IT news, forums, messages
Re: does PHP automatically run rawurldecode on any any URL to figure out what pass parameters to capture?

Posted by Iv�n S�nchez Ortega on 01/07/06 13:10

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

lawrence k wrote:

> Do most browsers auto encode a form input when it is sent via a GET
> method? Is the encoding standard? It does not break anywhere?

Yes, most browsers do encode form data prior to submitting it. Yes, it is a
standard, as per RFC1738. No, it doesn't usually break.

However, you should be careful about echo()ing URLs with spaces or other
simbols in them, for example:

<?php
$escaped_term = rawurlencode($term);
echo "<a href='search.php?term=$escaped_term'>Repeat search</a>";
?>

In most other cases, you won't need to worry about URL encoding.

- --
- ----------------------------------
Iván Sánchez Ortega -i-punto-sanchez--arroba-mirame-punto-net

Un ordenador no es un televisor ni un microondas, es una herramienta
compleja.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)

iD8DBQFDv6HB3jcQ2mg3Pc8RAhGRAJ0baLUwxzItmsycPRgaX6eaOFqWTQCeIv0J
T/DIPOPuOpRLmDB2v4F+f0g=
=w86i
-----END PGP SIGNATURE-----

 

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

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