Board index   FAQ   Search  
Register  Login
Board index PHP PHP Scripts

don't want html tags in my forum

Links for php scripts

Moderators: macek, egami, gesf

don't want html tags in my forum

Postby tranquillo » Sun Jun 01, 2003 5:16 am

Hi...

I've built a forum/guestbook thing for a website. it's verry basic. it simply writes text into a database and then shows it on a new page. the problem is that if someone writes a html tag such as a <img src...> the image will show... I don't want that...
can someone help me with this?

thanx.
tranquillo
New php-forum User
New php-forum User
 
Posts: 74
Joined: Sun Nov 24, 2002 6:48 pm
Location: katrineholm

Postby liquedus » Sun Jun 01, 2003 5:34 pm

why did you post the same question 2X.... its annoying to see someone do that... anyways i replied here

http://www.php-forum.com/p/viewtopic.ph ... highlight=
liquedus
php-forum Active User
php-forum Active User
 
Posts: 266
Joined: Tue Apr 08, 2003 5:18 am
Location: Ottawa, Canada

Postby Redcircle » Sun Jun 01, 2003 9:20 pm

another option is to use htmlspecialchars().

this will turn all chars that html useses into the equivalent html character.
User avatar
Redcircle
Moderator
Moderator
 
Posts: 830
Joined: Tue Jan 21, 2003 10:42 pm
Location: Michigan USA


Return to PHP Scripts

Who is online

Users browsing this forum: Bing [Bot] and 2 guests

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.