return a state name from an australian postcode
this will return an australian state code based on the postcode, so you can enter a valid postcode and see which state it belongs too. e.g: 2000 should return NSW
Demo
HTML
<form method="post">
<div class="form-group">
<label for="exampleInputEmail1">Enter Postcode</label>
<input type="postcode" name="postcode" class="form-control" id="postcode" aria-describedby="postcodeHelp" placeholder="Enter postcode">
<small id="postcodeHelp" class="form-text text-muted">Enter an australian postcode above, usually 4 digits.</small>
</div>
<button type="submit" class="btn btn-primary">Submit</button>
</form>