For example if i use $id= $_GET['id']; and then i use that $id as a condition for an if statement, do i have to use htmlspecialchars on $id?
e.g.
$id = htmlspecialchars($_GET['id']);
if($id) {
//code
}
Is htmlspecialchars needed, even though no html is being output?