PHP Select Statement and Special Signs
Posted: Mon Jun 03, 2002 3:47 am
How can I make a select if the database field is something like 'AAA\BBB.CCC'
A community of PHP developers offering assistance, advice, discussion, and friendship.
http://forums.devnetwork.net/
Code: Select all
<?php echo $HTTP_GET_VARSї"textfield"]; ?>, the output isAAA\BBB.CCC
, so the PHP modifies my textfield entered value because of the containing \ sign.AAA\\BBB.CCC
Because in the database the field contains values like AAA\BBB.CCC, so I need to make a SELECT.Can I escape from this ?
Code: Select all
stripslashes($HTTP_GET_VARSї"textfield"]);This is caused by having magic_quotes_gpc on in your php.ini file.so the PHP modifies my textfield entered value because of the containing \ sign
Macphp.net wrote:Sets the magic_quotes state for GPC (Get/Post/Cookie) operations. When magic_quotes are on, all ' (single-quote), " (double quote), \ (backslash) and NUL's are escaped with a backslash automatically.