Variable data in ajax call JQUERY

ajax, jquery

Solution

It should be

$.ajax({
   type: "POST",
   url: "somephp.php",
   data: {"data":$move},
});

Problem

I'm trying to use variable in AJAX call in jquery but it is not working. move variable contains different values. Please check the following code: ``` var $move = 'next'; $.ajax({ type: "POST", url: "somephp.php", data: {$move:1}, }); ``` Suggest any way to use $move variable in data.

Original source

Related problems