Page 1 of 1

AJAX with PHP

Posted: Mon Nov 03, 2008 4:35 am
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

Re: AJAX with PHP

Posted: Mon Nov 03, 2008 4:51 am
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

Re: AJAX with PHP

Posted: Mon Nov 03, 2008 9:53 am
by Hannes2k
Hi,
or using post instead of get for the ajax request.