My Current Setup
my sites home page (rankings.php) shows a list of users with a search form at the top to filter users by their gender or city.
I want to use jquery ajax to update the results without reloading the page.
-
My Question:
- with either method (load,post,get) you need to enter the url to send the request to but I'm not sure if the url should be the rankings.php page itself or another php file that holds the mysql query to get new results from the database. Which is best? should ajax requests go to another php and then the results sent back to the main php file where the content will be reloaded or should the ajax request go to the same php file it came from and then jquery to replace the content with the returned html data?
shorter version of question: should ajax url point to the page the ajax request comes from or point to another php file and then the data returned back?