button toggle - update state

button toggle - update state

hi there,
first of all i'm totally new to jquery, i think its awesome but couldn't get my idea on code.

i want a image to change when i click and update a something in mysql using a loaded php file, the php part i can handle but just don't know how to call the file and swap the image.

i want something like this.


image:

1 step: click image

2 step: Image while loading the php fille

3 step: the new image status image:

4 step: if i click back it will goes back to


any ideias how this can be done?