You still should check if $2 exist.. if ($2) and also make shure $2 is a number.. /help isnum