That is because you modify on the client side (your computer). So when you change the amount, it changes just for you and when you refresh, it pulls data again from the server, which is an unchanged value. I imagine you cannot tell the server how much you want the amount to be, because the server sends you the amount and you only store it, it's a one-way communication with your "mining".
It might work for other things where you send the numbers to the server, then you can alter the packets or the game binary itself.