fork download
  1.  
  2.  
  3. <?
  4.  
  5.  
  6. include '../config.inc.php';
  7.  
  8. iconv_set_encoding("input_encoding", "UTF-8");
  9. iconv_set_encoding("internal_encoding", "WINDOWS-1251");
  10. iconv_set_encoding("output_encoding", "WINDOWS-1251");
  11. $name = $_POST['name'];
  12.  
  13.  
  14. $sql = "UPDATE
  15. `test`
  16. SET
  17. `text`='$name'
  18. WHERE
  19. `index`='2'";
  20. var_dump($name);
  21. ?>
  22.  
Success #stdin #stdout 0.02s 24448KB
stdin
Standard input is empty
stdout

<?


include '../config.inc.php';

iconv_set_encoding("input_encoding", "UTF-8");
iconv_set_encoding("internal_encoding", "WINDOWS-1251");
iconv_set_encoding("output_encoding", "WINDOWS-1251");
$name = $_POST['name'];


$sql = "UPDATE
    `test`
SET
    `text`='$name'
WHERE
    `index`='2'";
mysql_query($sql);
var_dump(iconv_get_encoding('all'));
var_dump($name);
?>