|
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 < . 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]
|