I am trying to send some data via ajax using jquery
var name = $(".name").attr("data-name"); var value = $(".value").attr("data-value"); $.ajax({ url: 'panel.php', type: 'post', data: {name: value} }).done(function(){ alert("saved!"); });
So, both name and value can be two variables. Now only the value is a variable, but what about the name?
Greetings
source share