for.php modified to set incrementer to 1 if invalid input