This is a discussion on How to get un-escaped text from a form field within the PHP Language forums, part of the PHP Programming Forums category; Hi everybody, I have a php script that gets the text from a form field: <?php include("global....
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
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 |
|
|||
|
a wrote:
> I have a php script that gets the text from a form field: <snip> > The text comes back fine, just some characters (', " and \) are now escaped > (\', \" and \\). [...] > I'd like first to understand why this is happening > and if there is a way to disable this behavior magic_quotes_gpc 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! |
|
|||
|
That did it. Thanks for the tip!
A "Pedro Graca" <hexkid@dodgeit.com> wrote in message news:slrnds8kbp.gck.hexkid@ID-203069.user.individual.net... >a wrote: >> I have a php script that gets the text from a form field: > <snip> >> The text comes back fine, just some characters (', " and \) are now >> escaped >> (\', \" and \\). > [...] >> I'd like first to understand why this is happening >> and if there is a way to disable this behavior > > magic_quotes_gpc > > 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! |