A select is obtained
$base = mysql_query("SELECT DISTINCT(var)...");
$info = mysql_fetch_assoc($base;)
Checkboxes are dynamically created by the number of items in this array
<?php do{?>
<th>
<label class="switch">
<input type="checkbox" checked name="<?php echo $info['var'];?>">
<span class="slider round"></span>
</label>
</th>>
<?php } while($info = mysql_fetch_assoc($base));?>
And now, how do you get those validations in $ _POST ['?'] in this or another way that we can get the same result?