I have this form and its details need to be send in an email. As of now I have only managed to do the other fields to be included in the email but I am having a trouble with this multiple checkboxes. I have lots of checkboxes, 23 to be exact. Now, the problem I am encountering is, how will I include the value of the checkbox if one checkbox is checked or just two or three checkboxes are checked.
HTML
<input type="text" name="state" id="txt1">State:</input>
<input type="text" name="name" id="txt2">Name:</input>
Package A<input type="checkbox" name="radiog_dark" value="150.00" id="tcbx3" class="css-checkbox"/>
Package B<input type="checkbox" name="radiog_dark" value="175.00" id="tcbx3" class="css-checkbox"/>
Package C<input type="checkbox" name="radiog_dark" value="200.00" id="tcbx3" class="css-checkbox"/>
PHP
$state = $_POST['state'];
$entity = $_POST['entity'];
$email_message .= "State: ".clean_string($state)."\n";
$email_message .= "Entity: ".clean_string($entity)."\n";
Aucun commentaire:
Enregistrer un commentaire