There are several checkbox input types.

 <input type="checkbox" id="someide" name="chb[0]" data-target="somedata" class="hidden check-com" disabled> ................................................................... <input type="checkbox" id="someide" name="chb[5]" data-target="somedata" class="hidden check-com" disabled> 

There is a separate js , where the behavior logic is processed, which through ajax communicates with php .

I can not figure out how to correctly write the value of checkboxes in a session, so that later through ajax pull it out in JS .

I will clarify that there are no submit buttons

    1 answer 1

     session_start(); ..... $_SESSION['checkboxis'] = $_GET['ch']; 

    somewhere so on php.

    can be used and storage js

    http://javascript.ru/unsorted/storage you can read more here, I'm not strong in js I think colleagues will write something in addition to the sample code.

    • $ _GET ['ch'] where does this come from? the object is out of shape, it is only for managing the render of the DOM. - user199588
    • when you send ajax to the server with the GET or POST request string, it makes no difference. - Naumov