I have tried a very simple example of PHP MySQL Ajax following the example -
http://www.tutorialspoint.com/ajax/ajax_in_action.htm
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.
http://aiworker2.usask.ca/age/ajax.html http://aiworker2.usask.ca/age/ajax-example.php
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:
<?php echo "working"; ?>
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.