Jump to content

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.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.