[SOLVED] Loading Text with "<form>" tags int

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
User avatar
neophyte
DevNet Resident
Posts: 1537
Joined: Tue Jan 20, 2004 4:58 pm
Location: Minnesota

[SOLVED] Loading Text with "<form>" tags int

Post by neophyte »

Hey all,

I'm getting malformed html when I try to load html forms into a textarea from database. Some of the form elements being loaded into the textarea appear to be mingling with the actual form itself causing the actual form to break and not display properly.

Has anyone had this problem before? Does anyone know the solution?

Thanks
Last edited by neophyte on Mon Nov 01, 2004 6:24 pm, edited 1 time in total.
d_d
Forum Commoner
Posts: 33
Joined: Wed Jul 07, 2004 4:56 pm
Location: UK

Post by d_d »

Try using htmlentities on the text before putting it between the text area tags.

After the user makes submits the form you might need to use html_entity_decode to convert them back before putting the text back into the database.
User avatar
neophyte
DevNet Resident
Posts: 1537
Joined: Tue Jan 20, 2004 4:58 pm
Location: Minnesota

Post by neophyte »

You da man! Thank you!
Post Reply