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

Java - Error: no suitable method found for add(int, java.lang.String) -

java - JPA TypedQuery: Parameter value element did not match expected type -

c++ - static template member variable has internal linkage but is not defined -