The site has a link mysite.ru/index.php?fun=dual , clicking on which in the database adds 1 to one value.
Simultaneously with this link in the index.php page, I display the value from the database (the value to which 1 will be added). I have written in the code that if get fun and get fun==dual exists, then 1 is added to the base, and at the same time, after clicking on the link, I bring this value out of the base, but it does not change. If you click on this link again, then +1 is already going to the database, but the old value can be seen on this page.
For example: in the database the value is 0, and on the page index.php this value is displayed, that is, 0. There is also a link at the bottom, clicking on which in the database this value is +1. So, after clicking on the link on the page, the value 0 is again visible (but if at this moment you open the database, the value will be 1). Then, if you click on this link again, then the value 1 is visible on the page (although opening the base at this moment, the value is 2), and all the time after clicking on the link there is such a difference.
How to fix this difference?