I am having a lot of trouble getting a checkbox in a form to then pass to the .php file.. The html looks like
<td><label for="services">Services Requested:</label></td>
<td><form name="services" action="processForm.php" method="post">
<input type="checkbox" name="services[]" value="Massage" />Massage
<input type="checkbox" name="services[]" value="Facial" />Facial
<input type="checkbox" name="services[]" value="Manicure" />Manicure
<input type="checkbox" name="services[]" value="Pedicure" />Pedicure
</form>
</td></tr>
I am setting $services = $_POST['services']; right away in processForm.php.
But this error which exists further down in processForm.php still comes up every time.
if(empty($services)) {
$errors[] = "You must choose at least one service.";
}
var_dump($_POST)orvar_dump($services)to see what you get after submitting the form