Passing the value of checkboxes to the database

Can anyone do this?

In general, in mysql I need to enter the values ​​of $mas

    $id = $_POST['id_parent'];
       $mas = ( $_POST['sold'] );
      $result = mysql_query("INSERT INTO parent(id, children, children1, children2, children3, children4)
VALUES ('$id')");

Answer 1, authority 100%

It would not hurt to ask the question more correctly, but if you receive an array ($_POST[‘sold’]) and you need to distribute it accordingly into the fields children, children1, children2, childrenN, then you can do it like this:

$result = mysql_query("INSERT INTO parent(id, children, children1, children2, children3, children4) VALUES ('$id', '$mass[0]', '$mass[1]', '$mass[2]', '$mass[3]', '$mass[4]')");