homepage Welcome to WebmasterWorld Guest from 54.167.75.155
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

    
simple php question, retrieving form post values
topr8




msg:1263910
 9:32 am on Aug 11, 2005 (gmt 0)

using php 4.3.1

i have form values that are being posted to a second page for processing, it is for a db insert so i need to escape some characters...

however it seems that php is automatically escaping the characters, is this correct is there some module that may be loaded that is doing this automatically?

so for example i'm submitting ...

field1>> text in field one includes "quote and \slash characters

if on the receiving page i write it to the page

echo $field1;

it writes...

text in field one includes \"quote and \\slash charaters

i'm perplexed, but not unhappy with this, with asp i had to pass the variables through functions to escape cerain characters, how is this happening here without doing so?

 

Paul in South Africa




msg:1263911
 9:39 am on Aug 11, 2005 (gmt 0)

Magic Quotes are enabled in your PHP installation.

What are Magic Quotes [us2.php.net]

topr8




msg:1263912
 9:42 am on Aug 11, 2005 (gmt 0)

great thanks for that, very handy.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved