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

Π‘Π°ΠΉΡ‚ ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ Π² Π‘Ρ‚ΡƒΠ΄ΠΈΠΈ Π’Π°Π»Π΅Π½Ρ‚ΠΈΠ½Π° ΠŸΠ΅Ρ‚Ρ€ΡƒΡ‡Π΅ΠΊΠ°
ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ΠΈΠ΅ ΠΈ ΠΏΠΎΠ΄Π΄Π΅Ρ€ΠΆΠΊΠ° Π²Π΅Π±-сайтов, Ρ€Π°Π·Ρ€Π°Π±ΠΎΡ‚ΠΊΠ° ΠΏΡ€ΠΎΠ³Ρ€Π°ΠΌΠΌΠ½ΠΎΠ³ΠΎ обСспСчСния, поисковая оптимизация