Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cleaning text entered into textarea

Status
Not open for further replies.

emozley

Technical User
Jan 14, 2003
769
GB
Hi,

On my website I have a form that allows people to post comments. There is also a page that displays all these comments. The database is quite simple - it records the userID, the date, time and the message itself which is stored in a memo field.

The problem occurs if someone posts code into the database. For example if I enter the code for an iframe when someone views the comments page they could be looking at someone else's website. I could also post a tag which would redirect the user to another website.

What is the best way round this? Basically I would like to remove all tags, scripting and so on.

Thanks very much

Ed
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top