I have a problem. I want to get checked values from checkboxes and add them to a php array but i have no clue on how to do it. I can do it in javascript but i want a php array and i don't know how to convert js array to php array. I am gonna use the array in next php file and search rows from database with those values. I would appreciate if anybody suggests something on how to do it as i have no clue.
while ($row = mysqli_fetch_array($search)) {
$category = $row["Category"];
echo<inputtype=\"checkbox\"name=\"category\"value=\"$category\"required/>$kategoria</input><br /><br />";
}
<a id='answer' href='questions.php'><button>Answer to questions!</button></a>
This is how i make the checkboxes and then on button click i move to the next file