Reply to Re: sending param in _GET causes problems

Your name:

Reply:


Posted by Jan Thomä on 08/27/07 06:24

albert wrote:
> <img src="MyImg.php?text=<?=$MyText ?>" ... />
>
> In this case, there is no pb. I get the param with $_GET['text'] properly
> Still, if I send the following text : $MyText = "a + b" ;
> I doesn't work anymore... I guess the character '+' is the trouble.
The problem is, that you don't encode the text properly. If you send it
within an URL, you have to urlencode the text so it behaves properly.You
can use the urlencode function for doing this:

<img src="MyImg.php?text=<?=urlencode($MyText); ?>" .../>

Best regards,
Jan Thomä

--
_________________________________________________________________________
insOMnia - We never sleep...
http://www.insOMnia-hq.de

[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

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