3 Topics

Member Avatar for
Member Avatar for woodenduck

How do I use htmlspecialchars to escape all html but then allow two tags? I've escaped my text but want to allow the following two tags: img iframe Is there an easy way to do this? I never had a class on php so everything I know is self taught. …

Member Avatar for diafol
0
160
Member Avatar for Sanchixx

I am makeing a comment system, i have a string where i remove html code: `$area = stripslashes(htmlspecialchars($area));` But i replace text sometimes by code, but it doesn't work because of the code above: $txtSmileys = array (':-)', ':-('); $imgSmileys = array ('<img src="smiley.jpg" />', '<img src="smiley-sad.jpg" />'); $text = …

Member Avatar for Sanchixx
0
179
Member Avatar for andym67

Hi all, Pretty new to PHP and I am trying to get a handle on securing a form fields data. For example, I have a simple form where user enters information into a field called mydata. The field must be able to contain multiple words and basic punctuation. What I …

Member Avatar for ShawnCplus
0
166

The End.