How do you sanitize data in $_GET -variables by PHP?
I sanitize only one variable in GET by strip_tags.
I am not sure whether I should
Sanitize your inputs according to where it is going.
htmlspecialchars and/or str_replace.Same for POST or even data from your DB, since the data inside your DB should generally not be escaped.
Two things you should check:
[magic_quotes_gpc][1] enabled, you should either disable it (whenever you can) or stripslashes() GET, POST and COOKIE values. magic_quotes_gpc is deprecated, you should sanitize the data you manipulate, depending on the use of that data.