Hi all,

I'm new to this board, but not to PHP, however this problem has absolutely stumped me.

Iv'e got a form which consists of two textareas. the information entered in the textareas is echoed using PHP on the next page.

However, if someone enteres a word with a ' in it, it changes it to \' for example the word that's would change to that\'s

iv'e tried all the enctype options within <form> but iv'e had no success. Anyone know how to resolve this problem?

TIA

    just an add-in to hi-liters post: These characters need to be escaped, if not you usually get an ugly error message. The setting that causes these characters to be escaped automatically is magic quotes (set to on by default). It's not a bad thing; after all, these characters need to be escaped. Just run stripslashes() as hi-liter said when you want to print the data to the visitor.

    Cgraz

      it shows you how to use it. But basically:

      
      $text = "hello. My dad\'s car is parked outside";
      echo stripslashes($text);

      That will print $text without the slashes.

      Note: pretend there is a slash before the apostrophe. The forum is removing it.

      Cgraz

        Write a Reply...