mardi 26 janvier 2016

How to set the value for checkboxes and store it in db

I'm working on script where I need to use more than 5 checkboxes and each of them have to turn on to value 1 onclick and this value should be stored in db.How to solve this using JavaScript or other methods if any?????

<script type="text/javascript">
    function check(mycheck) 
    {
        var ch=document.getElementById("mycheck");
        if(ch.checked)
        {
                ch.value=1;

        }
        else
        {
                ch.value=0;
        }
    }
    </script>

`




Aucun commentaire:

Enregistrer un commentaire