I think you should be able to do this.
First set the country value in a hidden field somewhere on the page.
| Code: |
| <input type="hidden" id="country" value="<?php echo Country;?>" /> |
In your submit button do an onclick to call some javascript. You can either do it inline or call a function and dynamically set the action of the form.
| Code: |
function setAction(){
var countryVal = document.getElementById('country').value;
if(countryVal == 'USA'){
document.mypage.action ="https://page1.com";
} else if(countryVal == 'UK'){
document.mypage.action ="https://page1.co.uk";
}
}
|
Calling that function in the onClick will make it execute before the forum action is called. I have never tried this but it should work with some good old javascript. Good luck!
Tyler