//xx.php
<?php
// $_POST['zipcode'] holds the value of the submitted form parameter
// "zipcode"
$zipcode = trim($_POST['zipcode']);
// Now $zipcode holds that value, with any leading or trailing spaces
// removed
$zip_length = strlen($zipcode);
// Complain if the ZIP code is not 5 characters long
print "ZIP: ".$zipcode;
if ($zip_length != 5) {
print "Please enter a ZIP code that is 5 characters long.";
}
?>
//ran.html
<form name="user" action="xx.php"
method="get">
Username:
<input type="text" name="zipcode">
<input type="submit" value="Submit">
</form>