I have this code as anti-html and sql injection for a online game but it doesn't work and gives me the following error:
Fatal error: Only variables can be passed by reference
Here is my code:
$_POST = str_replace('<', '>', '\'', '\'', '\\', '<', '>', '"', '' ', '\', $_POST);
$_GET = str_replace('<', '>', '\'', '\'', '\\', '<', '>', '"', ''', '\', $_GET);
It's for the first of the two lines, but i'm sure that the problem will be for the second one too. I'm not good at php and these are files i took from the web. How can i solve this?