From jquery file to php:
$.post('http://botk-online.com/play2.php', {
'rate': Pontuacao.misses
});
How to modyficate this code to pass $data variable from php file to js external file and read it value.
From jquery file to php:
$.post('http://botk-online.com/play2.php', {
'rate': Pontuacao.misses
});
How to modyficate this code to pass $data variable from php file to js external file and read it value.
PHP
Javascript:
Use the
success
handler, which will run if the code returns successfully:Note the
, success(data, textStatus, jqXHR)
above. For example:http://api.jquery.com/jQuery.post/#example-5