AJAX with PHP

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
ahmadajcis
Forum Newbie
Posts: 6
Joined: Wed Jan 23, 2008 7:09 am

AJAX with PHP

Post by ahmadajcis »

I have a webpage (html page) that uses ajax when clicking on button,
the php code in the server side retrieving all the data in a table in mysql (this table is active, and other users can insert into it),
first time i click on the button, all the data will be retrieved, but , if another user insert new data to the table, and click on the button another time, the new data will not be retrieved,

is the problem clear???

i need help please, thanx alot
ahmadajcis
Forum Newbie
Posts: 6
Joined: Wed Jan 23, 2008 7:09 am

Re: AJAX with PHP

Post by ahmadajcis »

I found the solution,
because of the cache , all the data that are retrieved , they're retrieved from the cache, the optimal solution is to change the parameter that is sent with the url of the server side, like the timestamp
Hannes2k
Forum Contributor
Posts: 102
Joined: Fri Oct 24, 2008 12:22 pm

Re: AJAX with PHP

Post by Hannes2k »

Hi,
or using post instead of get for the ajax request.
Post Reply