|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2002-08-17 10:18 UTC] kalowsky@php.net
[2002-09-21 02:09 UTC] sniper@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 04:00:01 2025 UTC |
Here is a script that demonstrates the problem. If you uncomment line 4, magic quotes works consistently. If you do not, then some data (or SOMETHING) will cause it to fail most of the time. <? mysql_pconnect("","",""); // Must fill in db options if (isset($adCode)) { // echo get_magic_quotes_gpc(); $sql="INSERT INTO ad_code set sponsor='{$sponsor}', adCode='{$adCode}', cat='{$cat}'"; echo $sql."<br><br>"; mysql_query($sql); echo mysql_error(); } ?> Try various data with and with single quotes, and many times magic_quotes_qpc will fail to escape the variables. I would be happy to provide access to the actual script and server that caused me to notice this problem. Just email.