I suggest you read the
mysql tutorial, in case you haven't done it already. There, you will find the generic approach, you set up a generic.php on the server side, while you execute a remote query at the client's side.
In your case now. The two sides, client and server should use the same method. If you use 'get' on the client's side, use 'get' in your php too. If you use 'post', the same. Writing '?query=...' means that you are using the 'get' method, not the 'post' one. That's fine, you should use initializeGet. Still, I strongly suggest that you follow the approach of the tutorial. It's very reliable, at least I use it without any problems so far.
Finally, you can have a look at another tutorial, since I see that you want to inject scores.
Here.