code:is_int if ($_POST['vote'] < 0 || $_POST['vote'] > 5 || !is_int($_POST['vote'])) { echo "Error with voting"; die(); }