if (isset($_POST['posted'])) {
$url = $_POST['url'];
$theresults = ereg("^[a-zA-Z0-9]+://[^ ]+$", $url, $trashed);
if ($theresults) {
$isamatch = "Valid";
} else {
$isamatch = "Invalid";
}
echo "URL validation says $url is " . $isamatch;
}
?>