I want to get values from multiple select and pass them to Laravel controller.
Getting all values from multiple select:
<script>
function redirect() {
$("#sbtwo > option").each(function() {
if(document.getElementById("report1").checked == true)
window.open (+this.value+"/report1", 'w1');
});
}
</script>
I want to get +this.value+ and pass it to Laravel controller.
<form action="/teachers/printreports" method="POST">
{{ csrf_field() }}
<input type="checkbox" name="report1[]" id="report1"> Basic Data</div>
<input type="submit" class="btn btn-primary " value="Print" >
</form>
How to store javascript +this.value+ in to form element name= report1[]?