Form Field - Zip Code Range Verification
Posted: Tue Sep 29, 2009 4:12 pm
I am trying to create a HTML form with one form field. Zip Code. When a user enters in there zip, I would like to have an array or something validate that the entered value is within my set zip code range. If the zip entered is within the range it will forward them to a certain link to continue, if not they will be forwarded to the "sorry" page.
Any help is greatly appreciated!
Below is the code I have for the form. Basically what I need is the coding to incorporate into this as well as an external php file if necessary to process.
If zip code entered is within the set range they will get a message saying you are able to continue with order. Or congratulations. If not within the range they would get an message saying you are not within set zip range and cannot place an order.
<div align="left">Type your zip code below to make sure you are within range of purchase.
</div>
<form name="zip" onSubmit="return validateZIP(this.zip.value)">
<div align="left">Zip:
<input type="text" size="30" name="zip">
<input type="submit" value="Submit">
</div>
</form>
Any help is greatly appreciated!
Below is the code I have for the form. Basically what I need is the coding to incorporate into this as well as an external php file if necessary to process.
If zip code entered is within the set range they will get a message saying you are able to continue with order. Or congratulations. If not within the range they would get an message saying you are not within set zip range and cannot place an order.
<div align="left">Type your zip code below to make sure you are within range of purchase.
</div>
<form name="zip" onSubmit="return validateZIP(this.zip.value)">
<div align="left">Zip:
<input type="text" size="30" name="zip">
<input type="submit" value="Submit">
</div>
</form>