Hey dev,
Here the example of passing multiple variable using ajax. we need to send as data with Comma and colon to remote page.
1 2 3 4 5 6 7 8 9 10 11 12 13 | $.ajax({ url: 'data.php', type: 'POST', dataType: 'JSON', data: {edit_attendance: 2,aid:aid,attendance_date:attendance_date,start_time:start_time,end_time:end_time, work_description:work_description,work_status:work_status}, success: function (data) { console.date() }, error: function (e) { console.log("error") } }); |
Hope it will help…