Page 1 of 1
m tryin to create a postcode
Posted: Mon Apr 28, 2008 11:51 am
by jay23
Code: Select all
// Check for a postcode.
if (eregi ('^[[:alnum:][A-Z]{1,2}\d{1,2} \d[A-Z]{2}}$', stripslashes(trim($_POST['pcode'])))) {
$pc = escape_data($_POST['pcode']);
} else {
$pc = FALSE;
echo '<p><font color="red" size="+1">Please enter your Postcode!</font></p>';
}
im trying to create a postcode validation for a form but its not sumbiting the what have i done wrong can some1 help. many thanks to all u all in advance

Re: m tryin to create a postcode
Posted: Mon Apr 28, 2008 4:26 pm
by Kieran Huggins
What's the error you're getting?
Re: m tryin to create a postcode
Posted: Mon Apr 28, 2008 6:58 pm
by jay23
there isnt an error message. its just taht the form wont submit
Re: m tryin to create a postcode
Posted: Mon Apr 28, 2008 9:38 pm
by John Cartwright
your going to have to be a lot more explanatory than that..