do it on javascript.
make countries array (country, value, GMT) and loop it to a select box.
then make the "if" term
- PHP: Select all
if (countries_arr("GMT") = user_GMT)
document.write "selected='selected'";
i think i got errors on that code O_o
simple thought :}
now, how do we get the user
GMT?
- PHP: Select all
var d = new Date()
var gmtHours = d.getTimezoneOffset()/60;
document.write("The local time zone is: GMT " + gmtHours);
learn
js :P
____________
look on the samples here -
DateDiff