I just used the following code:
<form method="post"> <input id="user1" value="user1" name="invite[]" type="checkbox"> <input id="user2" value="user2" name="invite[]" type="checkbox"> <input type="submit"> </form> <?php if(isset($_POST['invite'])){ $invite = $_POST['invite']; print_r($invite); } ?>
When I checked both fields, the output was:
Array ( [0] => user1 [1] => user2 )
I know this does not directly answer your question, but it gives you a working example for the link and hopefully helps you solve the problem.
source share