
Jak zrobić, że po kliknięciu w zapis edytowany rekord zapisze się w MySQL?
Próbowałem szukać gotowców, nie znam tego plugina, jego budowy, może ktoś w skrócie powie jak się za to zabrać?
<html> <head> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous"> </head> <body> <table id="tabela" class="table table-bordered"> <thead> </thead> <tr> </tr> <tr> </tr> </table> </body> <script> $(document).ready( function () { $('button').click(function(){ var id = $(this).attr('id').split('_'); var i = $('#imie_'+id[1]).val(); var n = $('#nazwisko_'+id[1]).val() var dane = {imie: i, nazwisko: n} console.log(dane); $.ajax({ url : "plik.php", type: 'POST', data: dane, success: function(response){ $('#wynik').html(response); } }); }); }); </script> </html>
<?php ?>