How to Replace Backslash ( \ )?

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

I have a content management page where I can place rich text.

On the confirmation page I display the rich text the user has inputted.
However, I am noticing that when images are included in the rich text,
the confirmation page is not displaying it. When looking at the source
code, it is outputting:

<img height=\"59\" alt=\"Gmail\"
src=\"\" width=\"143\"
align=\"left\" vspace=\"10\" border=\"0\" >

Now, when I submit this the image does get inserted into the database
properly. However, on the confirmation page is does not. Is there a
replace function to use for "\" to only display the rich text on the
confirmation page?

I would use a separate variable to retain the above formatting so that
MySQL doesn't throw an error.

Any assistance would be much appreciated!!

Re: How to Replace Backslash ( \ )?

coder wrote:

Quoted text here. Click to load it

If you're outputting this to the browser, stripslashes() would be in
place. If you're inserting this code into a MySQL table, look into

Kim André Akerø
(remove NOSPAM to contact me directly)

Re: How to Replace Backslash ( \ )?



A million thank you's!  :-)

Re: How to Replace Backslash ( \ )?

BTW- I am already using the mysql_real_escape_string function on my
transaction. The stripslashes function is exactly what I was looking

Once again... THANK YOU !! :-)

Re: How to Replace Backslash ( \ )?

coder wrote:
Quoted text here. Click to load it

The addition of these backslashes is known as "magic quotes". You can
disable it in the config file.

Site Timeline