javascript - simple PHP AJAX : How to call a php script -


I'm trying to get my javascript function to use AJAX to call a php script. The PHP script will update the MySQL table but I have tested the PHP script and it works fine.

This is my job:

  function rate () {$ Ajax ({data: ', url:' update.php ', method:' GET ', success : Function (msg) {alert (msg);}}); }   

And the function is said later together:

  rate ();   

The php script is not required for any information, it should be called only, no one can tell where I am wrong.

Just use this example:

  & lt; Script & gt; Function rate () {$ .get ("update.php"); } & Lt; / Script & gt;    

Comments

Popular posts from this blog

How can I add a seperate action listener to all 14 of my buttons at once that can determine player turn?(java) -

php - Sorting an multidimension array using usort fails -

Simple file compression in C -