When i am editing fields from a database in a text area and the field has a </textarea> tag in it it kills the texarea it's suppose to be in and start writing to the page.
Is there a way to make a text area so that it displays whatever is in the db stays in the textarea?
MY script bug : displaying data from db to a textarea
Moderator: General Moderators
- twigletmac
- Her Royal Site Adminness
- Posts: 5371
- Joined: Tue Apr 23, 2002 2:21 am
- Location: Essex, UK
You could use htmlspecialchars() to make any HTML in the output from the database display as entities such as < and >. Or you could use str_replace() to replace the problem tag(s) with something else. It all depends on what you want the output to look like.
Mac
Mac