How can I insert multiple unchecked checkboxes values into DB not one input with hidden input fields

0 votes
<input type="checkbox" name="correct_answer[]" class="form-check-input" multiple>
<input type="text" name="option[]" class="form-control">
<input type="checkbox" name="correct_answer[]" class="form-check-input" multiple>
<input type="text" name="option[]" class="form-control my-2">


<input type="checkbox" name="correct_answer[]" class="form-check-input" multiple>
<input type="text" name="option[]" class="form-control">


<input type="checkbox" name="correct_answer[]" class="form-check-input" multiple>
<input type="text" name="option[]" class="form-control">


I want to insert first and second unchecked checkboxes' values into database with proper $key $value as well. How can I do that?

May 23, 2021 in Laravel by anonymous

edited 5 days ago 114 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP