You are here: Re: What If Someone Uses My Delimiter In Their Comment? « All PHP « IT news, forums, messages
Re: What If Someone Uses My Delimiter In Their Comment?

Posted by Rik on 09/28/96 11:47

Jacob.Lyles@gmail.com wrote:
> Hello All,
>
>
> I'm making a comment form for my website that will store the results
> in a flat file with some sort of delimiting character. However, I'm
> wondering what will happen if someone uses my delimiter within their
> comment. I thought one way to protect againt this would be to choose a
> character like < and convert all < to &lt . Is there a function in PHP
> that does this automatically?

Define automatically.
It's offcourse usefull to use htmlspecialchars() or htmlentities() on
comments that will be displayed in webpages..
If you want to just change 1 character with another: strtr(), else:
str_replace();

Grtz,
--
Rik Wasmus

 

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

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