no need to place the corresponding timezone in the boxes value...you will probably need that for shipping...the trick here is to use arrays....yes the initial set up is some work but the results and speed make up for it...
note: this is all server side code, do this clientside when its so easy on the server
you need to create 24 arrays (1 for each time zone, what are you doing about countries that straddle time zones (ie england has 2, china, austraila etc)?)[/red]
then simply look for the value of you country in the array with the in_array() function using a simple loop
//set the arrays for countries a thru h
[b]$tz1=("ca","cb","cc","cd");
$tz2=("ce","cf","cg","ch");[/b]
//assume user select country e from list (value="ce")
//variable called $country
//create counter to move thru arrays
[b]for ($i=1; $i<=24; $i++){[/b]
//check if value in array
[b] if (in_array($country,$tz[$i]){[/b]
//set timezone value if value is in array
[b] $timezone=$i;
}//end if
}//end for loop[/b]
the weight is a more interesting problem...the best bet here is to place the weight for the item in the product description table and extend that(item * quantity) and total that amount up to get to your total weight for the shipment...
you could use another array here which has all the possibilities and then:
1. check for an in_array of yes (the value exists) then run a query to get the total price for shipping
2. if no match then step thru the array comparing one value at a time until the total weigth is less that the next element in the array...that element is the weight used for pricing the shipping
hth