Hi!
I have a bit of a problem. I want several checkboxes with the same name but different value and then be able to catch the result in another php-page. Like this:
test.php
<form method=POST action=test2.php>
<input type=checkbox name=test value=1>First checkbox <br>
<input type=checkbox name=test value=2>Second checkbox
<input type=submit>
</form>
test2.php
<?php
echo $_POST['test'];
?>
If I do it like this and have both checkboxes checked the echo will return "2". How do I make it into something that I can retrieve both values from, both "1" and "2"? I know that I can use several names for the checkbox, but if there is another way to solve it I would apreciate some help to find it.
Ty in advance.