I am trying to validate the following checkboxes and output an error message for each field that isn't selected with php. Can anyone help?
<html>
<body>
<input type='checkbox' name='option[]' value='Car' >I have a Car licence<br>
<input type='checkbox' name='option[0]' value='Motorcycle' >I have a Motorcycle licence<br>
<input type='checkbox' name='option[1]' value='Fishing' >I have a Fishing licence<br>
<input type='checkbox' name='option[2]' value='TV' >I have a TV licence<br>
<input type='checkbox' name='option[3]' value='Dog' >I have a Dog licence<br><br>
<input type="submit" name="Submit" value="submit">
</body>
</html>
Aucun commentaire:
Enregistrer un commentaire