I want to secure my page by checking if the value is digital (0,1,2,3) and if it is in the range from 0 to 120. I think ctype_digit
function limits numbers, so
Not an answer, but here's why what you had wouldn't work:
if (!ctype_digit($_GET['category'] > 120) ?
^^^^^^^^^^^^^^^^^^^^^^^
The indicated part is inside the ctype call. So first PHP will check if the GET value is greater than 120, turning that into a boolean true/false. THEN the ctype is applied, which will always be false, as a boolean value is not a digit.