PHP Getting multiple checkbox values with POST?

Dee Vee

New member
OK So I have two checkboxes with the same name having two different values. If I check both of them it only displays the value of the last one instead of the value of both of them.

How can I make it display both.

BTW I am using this algorithm to display values:
foreach($_POST as $key => $value){
if ($value != "" && $key !="submitted"){
print "<li>$key value is: $value</li>";
}
else if($key != "submitted"){
print "<li>Please enter a value for $key</li>";
}

}
 
Back
Top