I have the following constructor:
public function __construct(){
foreach($_GET as $key=>$value){
$_GET[$key] = addslashes($value);
}
$this->get = $_GET;
}
and it's used like so:
$app->get['id']
Where 'id' is the parameter being passed through the URL.
Is there a good way to sanitize all the data through the constructor?