I have this script. It's a postcode check script, 8911 is now a correct code, but I have to add a few, i've tried everything but i'm not a genious in PHP, maybe someone could help me out. The postcode's that the script has to find "correct" are: 8911 (it's already in the script), 8912, 8913, 8914, 8915, 8916, 8917, 8918, 8919, 8921, 8922, 8923, 8924, 8925, 8926, 8931, 8932, 8933, 8934, 8935, 8936, 8937, 8939, 9084.
All the other code's have to be incorrect!
<?php
// postcode check
if($submit){
$patroon = "^([8911]{4}) ([A-Z]{2})$";
if(eregi($patroon, $pc)) {
echo "Postcode is correct";
}
else {
echo "Postcode is not correct";
}
}
else {
?>
<form method=post>
Postcode (8900 AB): <input type='text' name=pc><BR>
<input type=submit name=submit value=check!>
</form>
<?
}
?>
All the other code's have to be incorrect!
<?php
// postcode check
if($submit){
$patroon = "^([8911]{4}) ([A-Z]{2})$";
if(eregi($patroon, $pc)) {
echo "Postcode is correct";
}
else {
echo "Postcode is not correct";
}
}
else {
?>
<form method=post>
Postcode (8900 AB): <input type='text' name=pc><BR>
<input type=submit name=submit value=check!>
</form>
<?
}
?>