How to get un-escaped text from a form field

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • a

    #1

    How to get un-escaped text from a form field

    Hi everybody,

    I have a php script that gets the text from a form field:

    <?php

    include("global .inc.php");

    pt_register( 'POST', 'test1');
    echo $test1;

    ?>

    The text comes back fine, just some characters (', " and \) are now escaped
    (\', \" and \\). The problem is that I need the he text to be exactly as it
    was entered by the user. I could process the text myself, and replace the
    escaped characters, but I'd like first to understand why this is happening
    and if there is a way to disable this behavior and get the unmodified text
    directly.

    Thanks,

    A


  • Pedro Graca

    #2
    Re: How to get un-escaped text from a form field

    a wrote:[color=blue]
    > I have a php script that gets the text from a form field:[/color]
    <snip>[color=blue]
    > The text comes back fine, just some characters (', " and \) are now escaped
    > (\', \" and \\).[/color]
    [...][color=blue]
    > I'd like first to understand why this is happening
    > and if there is a way to disable this behavior[/color]

    magic_quotes_gp c

    see http://www.php.net/get_magic_quotes_gpc

    --
    Mail to my "From:" address is readable by all at http://www.dodgeit.com/
    == ** ## !! ------------------------------------------------ !! ## ** ==
    TEXT-ONLY mail to the whole "Reply-To:" address ("My Name" <my@address>)
    may bypass my spam filter. If it does, I may reply from another address!

    Comment

    • a

      #3
      Re: How to get un-escaped text from a form field

      That did it. Thanks for the tip!

      A

      "Pedro Graca" <hexkid@dodgeit .com> wrote in message
      news:slrnds8kbp .gck.hexkid@ID-203069.user.ind ividual.net...[color=blue]
      >a wrote:[color=green]
      >> I have a php script that gets the text from a form field:[/color]
      > <snip>[color=green]
      >> The text comes back fine, just some characters (', " and \) are now
      >> escaped
      >> (\', \" and \\).[/color]
      > [...][color=green]
      >> I'd like first to understand why this is happening
      >> and if there is a way to disable this behavior[/color]
      >
      > magic_quotes_gp c
      >
      > see http://www.php.net/get_magic_quotes_gpc
      >
      > --
      > Mail to my "From:" address is readable by all at http://www.dodgeit.com/
      > == ** ## !! ------------------------------------------------ !! ## ** ==
      > TEXT-ONLY mail to the whole "Reply-To:" address ("My Name" <my@address>)
      > may bypass my spam filter. If it does, I may reply from another address![/color]


      Comment

      Working...