@Ozinga

Tontonq array a direk nasıl uygulayacağını umuyorsun a be akıllı. Git biraz çalış sen
Lem white sende düşmüşsün tuzağa


'e be akıllı' o kadar laf sokacağına biraz post umu oku; benim de demek istediğim o

"öyle olsak direk $_GET = addslashes($_GET); der geçerdik "

dedim

@Whitekey

Daha önceden böyle birşeye ihtiyacım olmuştu kalkıp her get post lanan veriye htmlspecialchars falan ekleyeceğime tutup hepsini toptan filtreledim çalışmıyacağını bildiğim için denedim zaten

 
<?

  foreach ($_GET as $key => $value) {
    if (is_array($_GET[$key])) {
      foreach ($_GET[$key] as $key2 => $value2) {
        $_GET[$key][$key2] = htmlspecialchars($_GET[$key][$key2]);
      }
    } else {
      $_GET[$key] = htmlspecialchars($_GET[$key]);
    }
  }
  foreach ($_POST as $key => $value) {
    if (is_array($_POST[$key])) {
      foreach ($_POST[$key] as $key2 => $value2) {
        $_POST[$key][$key2] = htmlspecialchars($_POST[$key][$key2]);
      }
    } else {
      $_POST[$key] = htmlspecialchars($_POST[$key]);
    }
  }
  foreach ($_COOKIE as $key => $value) {
    if (is_array($_COOKIE[$key])) {
      foreach ($_COOKIE[$key] as $key2 => $value2) {
        $_COOKIE[$key][$key2] = htmlspecialchars($_COOKIE[$key][$key2]);
      }
    } else {
      $_COOKIE[$key] = htmlspecialchars($_COOKIE[$key]);
    }
  }
  foreach ($_SERVER as $key => $value) {
    if (is_array($_SERVER[$key])) {
      foreach ($_SERVER[$key] as $key2 => $value2) {
        $_SERVER[$key][$key2] = htmlspecialchars($_SERVER[$key][$key2]);
      }
    } else {
      $_SERVER[$key] = htmlspecialchars($_SERVER[$key]);
    }
  }
 
  foreach ($_ENV as $key => $value) {
    if (is_array($_ENV[$key])) {
      foreach ($_ENV[$key] as $key2 => $value2) {
        $_ENV[$key][$key2] = htmlspecialchars($_ENV[$key][$key2]);
      }
    } else {
      $_ENV[$key] = htmlspecialchars($_ENV[$key]);
    }
  }
?>



en iyi çözüm bunun için

<?
if (!get_magic_quotes_gpc()) {  
  foreach ($_GET as $key => $value) {
    if (is_array($_GET[$key])) {
      foreach ($_GET[$key] as $key2 => $value2) {
        $_GET[$key][$key2] = addslashes($_GET[$key][$key2]);
      }
    } else {
      $_GET[$key] = addslashes($_GET[$key]);
    }
  }
  foreach ($_POST as $key => $value) {
    if (is_array($_POST[$key])) {
      foreach ($_POST[$key] as $key2 => $value2) {
        $_POST[$key][$key2] = addslashes($_POST[$key][$key2]);
      }
    } else {
      $_POST[$key] = addslashes($_POST[$key]);
    }
  }
  foreach ($_COOKIE as $key => $value) {
    if (is_array($_COOKIE[$key])) {
      foreach ($_COOKIE[$key] as $key2 => $value2) {
        $_COOKIE[$key][$key2] = addslashes($_COOKIE[$key][$key2]);
      }
    } else {
      $_COOKIE[$key] = addslashes($_COOKIE[$key]);
    }
  }
  foreach ($_SERVER as $key => $value) {
    if (is_array($_SERVER[$key])) {
      foreach ($_SERVER[$key] as $key2 => $value2) {
        $_SERVER[$key][$key2] = addslashes($_SERVER[$key][$key2]);
      }
    } else {
      $_SERVER[$key] = addslashes($_SERVER[$key]);
    }
  }
 
  foreach ($_ENV as $key => $value) {
    if (is_array($_ENV[$key])) {
      foreach ($_ENV[$key] as $key2 => $value2) {
        $_ENV[$key][$key2] = addslashes($_ENV[$key][$key2]);
      }
    } else {
      $_ENV[$key] = addslashes($_ENV[$key]);
    }
  }
}
?>
dir ama sizin başka önerileriniz warmı bilmem

set_magic_quotes_runtime dicek herkes ama yanılıyorsunuz bakın adam ne demiş

"I think the post below is useless here..

magic_quotes_runtime is not magic_quotes_gpc.. when magic_quotes_runtime is enabled (on, =1, true), then every function call working with some kind of database will return strings with slashes (like addslashes everytime you call such a function). magic_quotes_gpc instead is what is meant in the post below - and in fact, magic_quotes_runtime does not do anything to it. but if there existed some function like set_magic_quotes_gpc it would not do anything too, the reason is mentioned below..

"

Bişi bilioz da konuşuoz euhehua

so if you're searchin' for a way to turn off quotes_gpc than set the directive in the INI-File or with the help of the php_value-flag of mod_php, when php is compiled as an apache module, inside of an .htaccess-file (PERDIR-configuration). otherwise you really have to check wether quotes_gpc is enabled or not and than add addslashes or stripslashes as you need on the input-variables.

and as mentioned in the post below that one belows this one ( -.- ) magic_quotes_runtime is mostrly useless too..