In your HTML page, define a onclick event in the form submit button when clicking on the button the data pass by the Jquery Ajax in another location. For example:
function insertData(){ var id = $('#id').val(); var text = $('#name').val(); $.ajax({ type:"post", url:'Page URL', data:{id:id,text:text}, success:function(res){ console.log(res); } }); }
Now open the page, which page URL link you define in the Ajax URL position and get all value in an array variable and now insert records using insert query.
Question and answer is powered by AnsPress.io