I have tried a very simple example of PHP MySQL Ajax following the example -
I created two files putting these in a same folder and uploaded it to the server.I have also checked the connection with DB from the php file. But I don't understand why the html file does not bring any data from the the database. What's wrong with that. The example i followed can be found here.
I'm very new in AJAX and really don't understand what's going on. Any sort of help will be appreciated.
My 2 cents: First of all, try a simpler Ajax request to get yourself used to the mechanics of the thing.
All you have to do on the PHP side is
echo out some data. For example, you could have your ajax open "test.php", then have "test.php" look like this:
Then, just alert
yourRequest.responseText (the response text property) and it should say "working".
Once you've got this moving smoothly, you can modify the PHP file to make a MySQL request.