I'm trying to create a registration form and I have the following fields:
name:<input type="text" name="name">
email:<input type="text" name="email">
city:<input type="text" name="city">
state/province:<input type="text" name="state">
zip/postal: <input type="text" name="zip">
country: <select>
<option value="USA">United States</option></select>
Now my question is, how can I do checks to see if a user doesn't juse input anything.
I know a little coding, like using if/else statements, but i'm not really sure about the foreign countries, provinces, and anything but the 50 states.
So how can I check if a postal code is accurate with that country, etc..
I know how to check for a valid name, email and city. What about the rest.
Also is there a two-digit code for provinces?
I want all those fields required if they meet certain conditions. Can someone tell me what I should do?
Thanks!