Forum Moderators: coopster
you will defenetly need to use php for this. to have your php called, the javascript has to change the location of the document or you can do this with a form/submit.
let me give you one example: create a form, place the button as an image input element into it and set the forms' action to your php script. then if the user clicks on that button-image, the form will be submitted and your php can change the image. voila.