PHP: filter_var sanitization secure enough?

hortonseal

New Member
I have a PHP script with the following line:\[code\]$query = "SELECT * FROM products WHERE product_id='" . filter_var($_GET[id], FILTER_SANITIZE_NUMBER_INT) . "'";\[/code\]Is this safe enough? How would you improve this code?
 
Back
Top