I have a mysql table with data like (name, address, sex, city state, zip, country, timezone) When a user fills in the form to add this data, i would like the relevant time-zone to be added based on state and country, how can i do this?
Thanks,
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Why not have the following select box in your form?
This would handle the fact there are states with multiple timezones. When you then get the result of this form submission, you can explode the value of the field on ‘/’, where
$_POST['locale']is the handler for the chosen select option, then you can extract timezone, country and state from a single field.