Jump to content

How to upload RTF editor output to MySQL database and retrieval


Rithotyn

Recommended Posts

I'm wanting a way to provide users the ability to perform a small amount of text formatting on form entered text. I've found a simple(ish) rich text formatting javascript tool (http://www.dynamicdrive.com/dynamicindex16/richtexteditor/index.htm) that allows this and as far as I can see will allow me to pass the text plus the added HTML formatting via POST into a variable in the next page.

 

My question is what functions would I need to apply to this content to ensure it maintains all the relevant 's and "s before I pass it into the database? Assuming thats succesfull, would I need to process it in anyway upon retrieval?

 

Any help is appreciated.

 

Ric

You should only have to use mysql_real_escape_string to keep the quotes in the database. But make sure that magic_quotes are not turned on or else you will double escape them. If it is on use strip_slashes before you escape the string or turn it off in the php.ini file as suggest in the magic quotes link above.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.