It is possible to use the dedicated function, is_numeric() to check whether it is a number or not. Post navigation How can we access the data sent through the URL with the POST method? How can we check the value of a given variable is alphanumeric?