I\'m starting to learn some of SQL with javascript and i want to put my variable (\"Val_Points from javascript\") into a table (\"Usuarios\") of a user (ex : Robert). It\'s this
"Standard" approach
foo.php
is the site which contains a button and includes a script:
...
foo.js
adds the on click handler:
$('#update-btn').click(function() {
$.ajax({
'url': 'fooHandler.php',
'method': 'POST',
'data': {'sid': ..., 'action': 'update', 'value': ...}
/* 'success': function(data) { ... } */
/* 'error': function ... */
});
});
fooHandler.php
handles requests to the server from the clients: