After shielding specials. characters not working unserialize. It does not work 100% due to shielding. Screened with mysql_real_escape_string . Without shielding in the database is not recorded. Tell me, please, how to properly shield special characters?

  • Forget about serialize and use json_* , for example - Sh4dow

1 answer 1

 $text = htmlspecialchars($text); /* спецсимволы */ $text = stripslashes($text); /* обратные слэши*/