Reply to Re: How to Replace Backslash ( \ )?

Your name:

Reply:


Posted by Kim Andrι Akerψ on 02/23/06 19:42

coder wrote:

> Hello,
>
> 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=\"https:mail.google.commailhelpimageslogo.gif\" 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!!

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
mysql_real_escape_string.

http://php.net/stripslashes
http://php.net/mysql_real_escape_string

--
Kim AndrΓ© AkerΓΈ
- kimandre@NOSPAMbetadome.com
(remove NOSPAM to contact me directly)

[Back to original message]


УдалСнная Ρ€Π°Π±ΠΎΡ‚Π° для программистов  •  Как Π·Π°Ρ€Π°Π±ΠΎΡ‚Π°Ρ‚ΡŒ Π½Π° Google AdSense  •  England, UK  •  ΡΡ‚Π°Ρ‚ΡŒΠΈ Π½Π° английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Π‘Π°ΠΉΡ‚ ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ Π² Π‘Ρ‚ΡƒΠ΄ΠΈΠΈ Π’Π°Π»Π΅Π½Ρ‚ΠΈΠ½Π° ΠŸΠ΅Ρ‚Ρ€ΡƒΡ‡Π΅ΠΊΠ°
ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ΠΈΠ΅ ΠΈ ΠΏΠΎΠ΄Π΄Π΅Ρ€ΠΆΠΊΠ° Π²Π΅Π±-сайтов, Ρ€Π°Π·Ρ€Π°Π±ΠΎΡ‚ΠΊΠ° ΠΏΡ€ΠΎΠ³Ρ€Π°ΠΌΠΌΠ½ΠΎΠ³ΠΎ обСспСчСния, поисковая оптимизация