i dont get your issue very well
but from what i got you need to make sure that the last field, that is 'rollnumid' is always a numeric value

JS level check

use this function to check whether it is a number

<script>
Code:
function isNumeric(n){
    if(!isNaN(n) && typeof(n)=='number'){
        return true;
    }else{
       return false;
    }
}

</script>
PHP level check
simply use the is_numeric method

PHP Code:
<?php
if(is_numeric($rollid)){
 do 
stuff
}
?>