That's because the URLs are not full urls including [url]HTTP://.[/url].. this is something you need to take care of in one of a few ways:
1.) Require http:// as a prefix to the url during submission
2.) Automatically prepend "http://" onto the url during insertion
3.) Look to see if "http://" appears in the string: if not [ add it ] | otherwise leave it be
Option 3 would probably be easiest to implement right away:
$dtld = array('http://', 'www.', '.com', '.edu', '.fr', '.org', '.eu', '.us', '.biz', '.net', '.cz', '.it', '.cc', '.ca'); // Add other TLD items as needed
//... echo
'<tr>
<td colspan="3"><a href="'. ((strpos($row['website'], 'http://')===false)?'http://':'') . $row['website'] .'">'. str_replace($dtld, '', $row['website']). '</a></td>
But it's best to take care of this in the database or form so that you don't have to use what looks to be dirty code....