We populate the list with standard ISO country codes. It seems like your shipping rates really only require "UK" and "Europe", and "international" rates. So your rates table could probably just have 1, 2, or 3 in a Region list to determine that.
So if you had a rates table that looked like this:
RateID | MaxWeight | Region | Rate
-------------------------------------------------------
1 | 6 | 1 | 5.5
Then you set a session variable for the Region{
<?php
$inEurope = array();
$inEurope[] = "AL";
$inEurope[] = "AD";
$inEurope[] = "AT";
$inEurope[] = "BY";
$inEurope[] = "BE";
$inEurope[] = "BA";
$inEurope[] = "BG";
$inEurope[] = "HR";
$inEurope[] = "CY";
$inEurope[] = "CZ";
$inEurope[] = "DK";
$inEurope[] = "EE";
$inEurope[] = "FO";
$inEurope[] = "FI";
$inEurope[] = "FR";
$inEurope[] = "DE";
$inEurope[] = "GI";
$inEurope[] = "GR";
$inEurope[] = "HU";
$inEurope[] = "IS";
$inEurope[] = "IE";
$inEurope[] = "IT";
$inEurope[] = "LV";
$inEurope[] = "LI";
$inEurope[] = "LT";
$inEurope[] = "LU";
$inEurope[] = "MK";
$inEurope[] = "MT";
$inEurope[] = "MD";
$inEurope[] = "MC";
$inEurope[] = "NL";
$inEurope[] = "NO";
$inEurope[] = "PL";
$inEurope[] = "PT";
$inEurope[] = "RO"
$inEurope[] = "RU"
$inEurope[] = "SM"
$inEurope[] = "RS"
$inEurope[] = "SK"
$inEurope[] = "SI"
$inEurope[] = "ES"
$inEurope[] = "SE"
$inEurope[] = "CH"
$inEurope[] = "UA"
$inEurope[] = "VA"
$inEurope[] = "RS"
$inEurope[] = "IM"
$inEurope[] = "RS"
$inEurope[] = "ME"
if (!isset($_SESSION['ShipRegion'])) $_SESSION['ShipRegion'] = 1;
if (isset($_POST['Country_2'])) {
if ($_POST['Country_2'] == "GB") {
$_SESSION['ShipRegion'] = 1;
} else if (in_array($_POST['Country_2'],$inEurope[] )) {
$_SESSION['ShipRegion'] = 2;
} else {
$_SESSION['ShipRegion'] = 3;
}
}
?>
AND your SQL statement looks something like:
SELECT * FROM ShipRates WHERE Region = regionParam and MaxWeight <= weightParam ORDER BY MaxWeight ASC LIMIT 1
Take the "Rate" result from that query and save it as a session variable and you should be able to use that in your eCart query.
(note: I just googled European ISO country codes, and that list may be incomplete, add or remove lines as necessary)