skip to Main Content

i want to insert data into database directly from a table (view) but when i click add btn only the first or the last row get insterted – Jquery ajax

here in this code i have passed the hardcoded value of month if i remove january it accepts december i.e last row how to solve this issue controller public function storeLeave(Request $request){ $admin= new Admin(); $admin->employee_name=$request->input('employee_name'); $admin->month=$request->input('month_JANUARY'); $admin->earned_leave=$request->input('earned_leave_JANUARY'); $admin->casual_leave=$request->input('casual_leave_JANUARY'); $admin->sick_leave=$request->input('sick_leave_JANUARY');…

VIEW QUESTION

Change value using CheckBox on table – Jquery ajax

I have this hbs code: <table> <tr> <th>A</th> <th>B</th> </tr> {{#each data2}} <tr> <td> <input type='checkbox' id='nm_produk' class='product' name='data_{{no}}' value="{{no}}"> <label>{{item}}</label> </td> <td> <input disabled type='text' placeholder='0' name='data_{{no}}' id='qtytbs'> </td> </tr> {{/each}} </table> And this script: $(document).ready(function() { $(".product").change(function() {…

VIEW QUESTION
Back To Top
Search