need help with flash and php

i made myself a hit counter for how many times my swf was viewed

with the code

loadVariablesNum("filename.php", 0);

which then loads my php

now my php code opens my txt file and increases the number in there by one

my hit counter works as you can see here www.cnc.hopies.co.uk

but now i wanna make it work via button for example i have a download link under this link it says number of times downloaded with a blank dynamic text box with a var name now i click this button i want that button to loadVariablesNum("download.php", 0); how do i do this?

is this the way i do it and is this the way i make raters for rate this file?
i tried to do the times downloaded but its not working nor is it working via server (FTP)

i tried this code

onClipEvent (load) { //i even tried enterFrame
this.onPress = function() {
loadVariablesNum("download.php", 0);
};
}

can anyone please help me