With the latest PHP release I'm not sure how to get array values that are posted from a form. This is what I would normally do:
<form method = "post" action = "doit.php">
<input type = "checkbox" name = "math[]" value = "Basic"> Basic <BR>
<input type = "checkbox" name = "math[]" value = "Algebra"> Algebra <BR>
<input type = "checkbox" name = "math[]" value = "Calculus"> Calculus <BR>
<input type = "submit" name = "submit" value = "Do Something">
</form>
Resulting page:
<?php
$math = $_POST['math'];
if ($math != "") {
$math = implode("<BR>", $math);
}
// do whatever you want with the math list now
?>
I assume I'm not getting the posted array correctly because if I echo math, there isn't anything there - not even an array. I tried:
$math = $_POST['math'][]; with no luck as well.
Any help or links to an explanation of how to get posted form data with the latest release of php would be greatly appreciated! Thanks!!!