Results 1 to 3 of 3

Thread: after submit textarea values replaced the quotes with \' in php

  1. #1
    Join Date
    Nov 2006
    Location
    India
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question after submit textarea values replaced the quotes with \' in php

    hi,

    can anyone help in this

    i m submitting a form which contains a textarea.. when i get the posted values in php the textarea values replaced the ' with \' and also the " with \"

    how do i remove this \ in the posted value..

    i m sending mail after submitting the form.. in the mail also i m getting the \

    can anyone help..

  2. #2
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    That's a security issue, and it's good. But... yes, at times, it can cause problems.
    Please post the code.
    likely, stripslashes($var); will do the trick.
    Daniel - Freelance Web Design | <?php?> | <html>| espa˝ol | Deutsch | italiano | portuguŕs | catalÓ | un peu de franšais | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  3. #3
    Join Date
    Dec 2004
    Location
    UK
    Posts
    2,358
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by vidya_onnet View Post
    i m submitting a form which contains a textarea.. when i get the posted values in php the textarea values replaced the ' with \' and also the " with \"

    how do i remove this \ in the posted value..
    You might look into disabling "magic quotes", thereby avoiding the addition of the slashes in the first place (and receiving a slight performance increase in the process). Just be sure to escape values when you really do need to do so.

    Mike

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •