m_r_e_s () RETURNS a shielded value; it does not change the original.
$int = mysql_real_escape_string($_POST['int']); $query = "UPDATE ... interests = '$int' ...";
Note that I have added quotes around int to the POST value. Without quotes, PHP sees this as a constant value (e.g. define ()). If he does not find the constant of this name, he politely assumes that you mean that he is using a string and is configured accordingly, but will issue a warning. If you did
define('int', 'some totally wonky value');
earlier, then you will get access to the wrong POST value because PHP will see it as $_POST[some totally wonky value] .
Marc B Jul 08 '11 at 17:15 2011-07-08 17:15
source share