Our site is using PHP Version 5.2.14
Lately our hoster probably changed magic-quote defenition, and I came up with the suggested solution [code bellow]
- Is this solution OK for PHP Version 5.2.14 ?
- What should I change when we upgrade to PHP version 6 ?
// Code: function fHandleQuotes($s) { if (get_magic_quotes_gpc()) return ($s); return (addslashes($s)); } . . . // Usage: . . . $query = "UPDATE myTable SET myField = '" . fHandleQuotes($_POST['fieldName']) . "'"; . . .
In PHP 6 magic_quotes will be removed!
Now you can use this function.