You cannot have PHP code execute when a user changes a select box. You'd have to use Javascript for this. I think you've got the idea right when you use window.refresh code, then in the beginning of the file, you can look at the values of $destination and add that to $amount.